Table Listing in Combo Box 
Author Message
 Table Listing in Combo Box

Does anyone know how to list the tables within a database in a combo box?
The help files (I'm on version 4) point to the ListTables Method, but it
says that this method is outdated.
Also any suggested reading for ODBC, RDO, DAO, etc... would be
appreaciated.
Thanks from Iowa.



Fri, 07 Jan 2000 03:00:00 GMT  
 Table Listing in Combo Box



Quote:
> Does anyone know how to list the tables within a database in a combo box?
> The help files (I'm on version 4) point to the ListTables Method, but it
> says that this method is outdated.

You can populate a combo box from the TableDefs collection, which is a
property of the Database object.  Each TableDef object has a Name property.
 Thus:

        Dim dbsCurr as Database
        Dim tdfCurr as TableDef

        [initialize database somehow]

        For Each tdfCurr in dbsCurr.TableDefs
           ComboBox1.AddItem tdfCurr.Name
        Next tdfCurr

Bob Rossney



Fri, 07 Jan 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Listing all tables or queries in a list/combo box

2. How to list macro names in a combo box or a list box

3. : Can I list tables from a combo box?

4. Automatically placing list of table names in to a combo box

5. VB combo list box and Access Table

6. VB combo list box and Table database

7. help listing tables in a combo box

8. VB combo list box and Access table

9. Vb Combo list box and Table Data base

10. dialog box with list box or combo box

11. Limiting Access to Text Boxes, List Boxes and Combo Boxes

12. How to list macro names in a combo box or a list

 

 
Powered by phpBB® Forum Software