You are accessing this site in a read-only mode. For full access to all member benefits, including message posting, please login or register. Registration is completely free, simple, and takes only a few seconds.
The message you are replying to and its parents are listed in the reverse order with the most recent posts first. This might not be the whole discussion thread. To read all the messages in this thread please click here.
RE: Query for record count - all tables
Jerry Whittle
30 Oct 2009 19:26
Is there user level security on that database where you need to log in with a user name and password? If so you don't have the permissions to query those tables. Get someone with Administrator privileges to run it.
The null error just happen due to the read error problem.
Signature
Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> Thanks for the quick reply, Jerry! > [quoted text clipped - 20 lines] > > > > > > THANKS!!!!!!!!
GD
30 Oct 2009 18:39
Thanks for the quick reply, Jerry!
When I try to use this SQL on a small db, I get the following error message: Record(s) cannot be read; no read permission on 'MySysACEs'.
And when I click OK, I get: Invalid use of Null.
What do these mean?
Signature
GD
> SELECT MSysObjects.Name, > CLng(DCount("*",[name])) AS NumRecords [quoted text clipped - 10 lines] > > > > THANKS!!!!!!!!
Jerry Whittle
30 Oct 2009 18:03
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.
Signature
Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> Can someone help me with a query that would give me the name and number of > records for all tables in a database? > > THANKS!!!!!!!!
GD
30 Oct 2009 17:35
Can someone help me with a query that would give me the name and number of records for all tables in a database?