how count records in table quickly?

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.
 
D

Dirk Goldgar

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
 
I

Ian Elliott

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)
 
Top