Number of Tables

  • Thread starter Thread starter Guest
  • Start date Start date
Thx Barry.
But this instruction is returning 6 when I create one table and it also
returns 6 when I have 0 tables defined?
 
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.
 
Back
Top