Data & Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mclueless
    New Member
    • Jan 2008
    • 56

    Data & Table

    I have a form where in there are several command buttons. the command buttons bore names of various tables in the database. when a particular button is clicked on i want that table to be displayed in a tabular format to the user. what should i do???
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You need to dynamically pass the table names to database using SQL query .
    Fetch data and display in some grid control.

    Comment

    • mclueless
      New Member
      • Jan 2008
      • 56

      #3
      i just found that there are 115 tables.....ofco urse i cannot make 115 command buttons....what should i ideallly do???.....is ther some other way for letting the user view the data in the database which can be simpler?

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Place a DataGrid, and Open a Connection Object,
        Open a Recordset for the Command's Caption, and Set the Datagrid's Source..
        Refresh DataGrid..

        REgards
        Veena

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Originally posted by mclueless
          i just found that there are 115 tables.....ofco urse i cannot make 115 command buttons....what should i ideallly do???.....is ther some other way for letting the user view the data in the database which can be simpler?
          place a listbox on the form and populate the control with name of tables in the database.

          on selection in the lisbox ,pass the tablename and open the recordset.
          display the fetched data in a grid control.

          Comment

          Working...