Agreed with CJ. I could be wrong but if i remember correctly I don't think a recorset's record count property is reliable until one has actually moved to the end of the recordset.
To expand on CJ's code here is my template (typing this from memory without any intellisense, sorry in advance for typos)
Code:
On Error GoTo ErrHandler
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MY_QUERY", dbOpenSnapshot) 'Use dbOpenDynaset if you may need to edit the values within the recordset
If not (rs.BOF and rs.EOF) Then 'Make sure the recordset has records otherwise we'll get errors if we try to move through the recordset
rs.MoveFirst 'this line may not be necessary but couldn't hurt
Do While not rs.EOF 'begin looping through the recordset
'Do Work Here
rs.MoveNext 'Don't forget to move to the next record in the recordset or you'll get stuck in an infinite loop
Loop
Else
'Code to run if the recordset is empty goes here
End If
rs.close
ExitHandler:
Set db = Nothing ' Clean up all of the objects that we previously set
Set rs = Nothing
Exit Sub
ErrHandler:
MsgBox err.description, , "Error #" & err.Number
Resume ExitHandler
Please review http://allenbrowne.com/ser-29.html