Count number of records after filtering

  • Thread starter Thread starter Gerwin Ramaker
  • Start date Start date
G

Gerwin Ramaker

Hello,


Probably a question that's easy to answer but I have been searching for
hours now & it's driving me rather crazy: I have applied a filter to a form
and now I want to know how many records I have got as a result, or better, I
want to know if there are any records left - how do I do that?

Tried so far:

If Form.Recordset.Count = 0 Then ...
If Iserror(Form.RecordSet.Count) Then ...
If EOF(Recordset) Then ...

but that all does not work.


Thanks,
Gerwin
 
Try:
If Me.Recordset.RecordCount = 0 Then MsgBox "All gone"

Immediately after a filter the full count may not be available, but it
should be at least 1 if there are any records.
 
Back
Top