help listing tables in a combo box 
Author Message
 help listing tables in a combo box

I 've made a combo box list all the tables in a database
but im getting files in the list that start out with Msys
example:
Msyscolumns
i dont understand why these are showing up in the tabledefs
and im trying to get them from showing in the combo box

thanks to anyone




Sat, 24 May 1997 05:45:21 GMT  
 help listing tables in a combo box

Jeff,

        These are the system tables.  While you're loading the combo box, make it conditional so that it the table name starts
with 'MSys' it doesn't get included.  Also, check out Attributes to avoid having querydefs included.

Dave



Sat, 24 May 1997 21:39:02 GMT  
 help listing tables in a combo box

Quote:

> I 've made a combo box list all the tables in a database
> but im getting files in the list that start out with Msys
> example:
> Msyscolumns
> i dont understand why these are showing up in the tabledefs
> and im trying to get them from showing in the combo box

> thanks to anyone



They're system tables - can't live without 'em.  You'll have to use the
Attributes property on the TableDef to see if it's a system table
(TableDef.Attributes AND DB_SYSTEMOBJECT) where DB_SYSTEMOBJECT =
&H80000002 before adding it to your combo box.


Sat, 24 May 1997 21:31:55 GMT  
 help listing tables in a combo box

Quote:

>I 've made a combo box list all the tables in a database
>but im getting files in the list that start out with Msys
>example:
>Msyscolumns
>i dont understand why these are showing up in the tabledefs
>and im trying to get them from showing in the combo box

>thanks to anyone



The table names beginning with Msys are the system tables that are
used internally by Jet to hold queries, table structures, permissions,
etc. These are stored as normal tables with the system object attribute
set (which means you can't open them yourself under most circumstances).

Are you using the ListTables method or the TableDefs collection?

If you are using ListTables you need to look at the "Attributes" field
of the snapshot. If the DB_SYSTEMOBJECT flag (&H80000002) is set

e.g. S.Fields("Attributes") & DB_SYSTEMOBJECT <> 0

then the field is a system table.

If you are using the TableDefs collection you need to test the Attributes
property as above.

You can then exclude the system tables from you list.

Hope that helps.

Nic



Sun, 25 May 1997 17:39:45 GMT  
 
 [ 4 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. pls help : COMBO box or list box

4. HELP! ADO bound list box and combo box

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

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

7. VB combo list box and Access Table

8. VB combo list box and Table database

9. Table Listing in Combo Box

10. VB combo list box and Access table

11. Vb Combo list box and Table Data base

12. dialog box with list box or combo box

 

 
Powered by phpBB® Forum Software