Number of Tables

L

lss

Thx Barry.
But this instruction is returning 6 when I create one table and it also
returns 6 when I have 0 tables defined?
 
V

Van T. Dinh

Access itself use a number of Tables (system & hidden with name starting
with "MSYS") to store its internal data.

IIRC, you need to create a Query something like:

SELECT Count(MSysObjects.Name) AS CountOfName
FROM MSysObjects
WHERE (((MSysObjects.Type) In (1,4,6))
AND ((MSysObjects.Name) Not Like "MSys*"))

1 is local Table type, 4 is ODBC-linked Table and 6 is JET/Access linked
Table.

You can then run the above SQL (in code if required) to get the number of
user-defined Tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top