SELECT MSysObjects.Name,
CLng(DCount("*",[name])) AS NumRecords
FROM MSysObjects
WHERE (((MSysObjects.Type)=1))
ORDER BY CLng(DCount("*",[name])) DESC;
I can't take credit for the above. Notice where it says =1. That means
records within the .mdb or .accdb file. It doesn't do linked tables. I think
that 6 will do that.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
GD said:
Can someone help me with a query that would give me the name and number of
records for all tables in a database?
THANKS!!!!!!!!