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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining number of records in recordset

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
US
I use the following code to produce a recordset of a query(stDocName). Is there a means to determing the number of records in the produced recordset? Thanks

Set qdf = DB.QueryDefs(stDocName)
Set prm = qdf.Parameters(0)
prm = strFileRef
Set rs = qdf.OpenRecordset
 
[tt]msgbox rs.recordcount[/tt]

You might throw in an rs.movelast first, though, to fully populate the recordset first (and check for .bof/.eof or similar first)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top