Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing RECORDSETS / RecordCount
Message
From
17/08/2001 15:09:20
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
To
17/08/2001 14:29:54
General information
Forum:
Visual Basic
Category:
VBA
Miscellaneous
Thread ID:
00545560
Message ID:
00545588
Views:
31
Simply do a check to make sure that the recordset actually contains records before doing the recordcount. i.e.:

rstMyRecordset.Open "SELECT * FROM tblMyTable;"
With rstMyRecordset
If .BOF and .EOF then
'empty recordset
Else
rstMyRecordset.MoveLast
RecordCount = rstMyRecordset.RecordCount
End if
End With
Previous
Reply
Map
View

Click here to load this message in the networking platform