
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