record counts

  • Thread starter Thread starter NH
  • Start date Start date
N

NH

I want to have a 'control panel' form which amongst other things will
display record counts for each table.

Down one side of the form I want text boxes displaying current record
counts:

Table1 : 743258
Table2: 326546
Table3: 324524

Is there an easy way of doing this, or do I have to use subforms?

Thanks

Nick
 
Put a text box on the form for each row count and set the
ControlSource to =DCount(1,"{tablename}","")

You would have to replace {tablename} including {} with the
table names from your application.

Hope This Helps
Gerald Stanley MSCD
 
The following SQL will run a query against the MSysObjects table to get
table names and the DCount function will return recordcounts for each of
those tables.

SELECT MSysObjects.Name AS TableName, DCount("*",[name]) AS RecordCount
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "msys*") AND ((MSysObjects.Type)=1))

You can use this SQL as the RecordSource of a form.

hth,
 
Back
Top