Assuming you are using a recordset. You probably need to do this:
Database queries (recordset) return a BOF (beginning of file) if there are no rows.
Hope that helps.
Code:
if RS.bof then
'no records
else
'do something
end ifDatabase queries (recordset) return a BOF (beginning of file) if there are no rows.
Hope that helps.

