How to show the recordcount of each table in Tables view

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using Access 2000. The Details view shows Name, Description, Modified,
Created, Type. It would be really handy to see the record count of the tables
listed without having to open them one at a time. Is there any way to do
this? Is there a Form that shows this?
 
Try and use the dcount in the query
SELECT Name, Description, Modified, Created, Type, DCount("*",[Name]) AS
CountRecords
FROM TableName
 
MarioK said:
I'm using Access 2000. The Details view shows Name, Description,
Modified, Created, Type. It would be really handy to see the record
count of the tables listed without having to open them one at a time.
Is there any way to do this? Is there a Form that shows this?

Ofer's suggestion of using DCount in the query is pretty good, except
that you need some source for the list of tables in the database. You
can get that from the hidden system table, MSysObjects:

SELECT
MsysObjects.Name,
DCount("*",[Name]) AS Records,
MsysObjects.DateCreate,
MsysObjects.DateUpdate
FROM MsysObjects
WHERE (
(Left$([Name],1)<>"~") AND
(Left$([Name],4)<>"Msys") AND
(MsysObjects.Type) In (1,4,6)
);
 
Ofer's suggestion of using DCount in the query is pretty good, except
that you need some source for the list of tables in the database. You
can get that from the hidden system table, MSysObjects:

Just don't expect the form based on this query to open really fast, if
your tables are at all large! There's a reason this information isn't
displayed: it's volatile (if other users are in the database), and
must be calculated each time, by traversing every table's recordset.

John W. Vinson[MVP]
 

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

Back
Top