how many rows in table?

  • Thread starter Thread starter Tcs
  • Start date Start date
T

Tcs

This is PROBABLY really easy, but since I haven't done it before...

I need to find out how to determine the numbers of rows in a table, in VBA. Is
there an easy way without having to read thru the entire table and incrementing
a counter?

Thanks in advance.

Tom
 
Local table?
Try:
CurrentDb().TableDefs("MyTable").RecordCount

Linked table?
Try:
? DCount("*"), "MyTable")
 
Last example has spurious bracket. Should be:
DCount("*", "MyTable")

Note to self: do not post while asleep. :-)
(It's after midnight here.)
 
Back
Top