how count records in table quickly?

  • Thread starter Thread starter Ian Elliott
  • Start date Start date
I

Ian Elliott

I want to find out the # of records in a large table (hundreds of thou or
maybe million(s)). Is there a quick way to do? I have opened the table and
clicked on the double right arrow to find out, but this is taking a couple
minutes so far.
Thanks.
 
Ian Elliott said:
I want to find out the # of records in a large table (hundreds of thou or
maybe million(s)). Is there a quick way to do? I have opened the table and
clicked on the double right arrow to find out, but this is taking a couple
minutes so far.


If it's a local Jet table, you can get the number of records with this line
of code in the Immediate Window:

?CurrentDb.TableDefs("YourTableName").RecordCount

If not, you can run a query with this SQL:

SELECT Count(*) FROM YourTableName
 
Thanks Dirk that worked!


Dirk Goldgar said:
If it's a local Jet table, you can get the number of records with this line
of code in the Immediate Window:

?CurrentDb.TableDefs("YourTableName").RecordCount

If not, you can run a query with this SQL:

SELECT Count(*) FROM YourTableName


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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