I'm trying to loop through a recordset to display the data. Everytime there are no matches I get an error because the recordset is empty. How can I check if the recordset is empty?
I tried rs.recordcount and it seems to always equal -1 before rs.movefirst but it can't do rs.movefirst if there aren't any records.
Here is some of my code:
If (rs.RecordCount = -1) Then
MsgBox ("There were no matches during that time. Please select another timeframe"
frmChoiceWizard.Hide
frmChoiceWizard.Show
Else
rs.MoveFirst
Any ideas? Thanks!
I tried rs.recordcount and it seems to always equal -1 before rs.movefirst but it can't do rs.movefirst if there aren't any records.
Here is some of my code:
If (rs.RecordCount = -1) Then
MsgBox ("There were no matches during that time. Please select another timeframe"
frmChoiceWizard.Hide
frmChoiceWizard.Show
Else
rs.MoveFirst
Any ideas? Thanks!