From: Dorian on
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".
From: Tom van Stiphout on
On Mon, 14 Dec 2009 12:56:01 -0800, Dorian
<Dorian(a)discussions.microsoft.com> wrote:

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


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