Docmd.Applyfilter

  • Thread starter Thread starter Dorian
  • Start date Start date
D

Dorian

Is there any way to trap whether a DoCmd.Applyfilter finds the record or not.
I tried inserting an On Error before the command but on a not found condition
it was not triggered.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
On Mon, 14 Dec 2009 12:56:01 -0800, Dorian

Yes, on the next line of code.
Example:
DoCmd.ApplyFilter WhereCondition:="ID=-1"
If Me.RecordsetClone.RecordCount = 0 Then MsgBox "Oops - zero records"

-Tom.
Microsoft Access MVP
 
Back
Top