Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number of rows in table?

Status
Not open for further replies.

hyrogen

Programmer
Jul 10, 2003
60
GB
Im just wondering does anyone know how to get the number of rows in a table on the current page only, for word, using vba?

I've been struggling on this for ages,
cheers
 
Three different ways
Code:
=DCount("*", "TableName")

Code:
=Me.RecordSetClone.RecordCount

Code:
SELECT Count(*
) As NumberOfRecords
FROM TableName;

________________________________________________________
Zameer Abdulla
Help to find Missing people
Even a thief takes ten years to learn his trade.
 
is that even if the table spans multiple pages in word? AND it will only return the number of rows on the Current page?


Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top