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

Last Record in a Resultset

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm displaying a list of links from Access. Each link needs a linebreak under it EXCEPT for the last link. Is there a way to identity the last record in a resultset? I know I could always use a COUNT(*) query to get the last record but I figured there must be an easier way!
 
weird, it returns "-1" (thus meaning im using the wrong cursor. What's weird is I tried using all of the adOpens...
 
Have you tried this line after setting the cursor to adOpenStatic?
Code:
If objRecordset.Supports(adBookmark) Or objRecordset.Supports(adApproxPosition) Then
	' RecordCount will work!
End If

It this doesn't work either, a bad trick is to do a moveFirst, moveLast then call the recordCount
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top