Docmd.Applyfilter

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".
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top