Yes. All objects are in the Documents collection. Look it up in the
help file. Then write code like this:
Dim c As DAO.Container
For Each c In CurrentDb.Containers
Debug.Print "Container=" & c.Name & ", Count=" & c.Documents.Count
Next c
SELECT Type, Name FROM MSysObjects ORDER BY Type, Name
SELECT MSysObjects.Type, Count(MSysObjects.Type) AS Total
FROM MSysObjects
GROUP BY MSysObjects.Type
ORDER BY MSysObjects.Type, Count(MSysObjects.Type);
SELECT MSysObjects.Type, Count(MSysObjects.Type) AS Total
FROM MSysObjects
GROUP BY MSysObjects.Type
ORDER BY MSysObjects.Type, Count(MSysObjects.Type);
He might prefer to exclude system tables and temporary objects
from his counts.
SELECT m.[Type] AS obj_type, Count(m.[Type]) AS CountOfType
FROM MsysObjects AS m
WHERE (((m.[Name]) Not ALike '~%' And (m.[Name]) Not ALike 'MSys%'))
GROUP BY m.[Type]
ORDER BY m.[Type];
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.