Apply Filter button on Form

L

Logreq

I would like to add a button to my form that allows me to filter the form
depending on whether a date field is populated or not.

The field name on the form is "txtQueryClosed" and the control is "Closed
Date"

Many Thanks
 
P

Paterson

private sub Button_Click()

Me.Filter = "NOT IsNull([Closed Date])"
Me.FilterOn = True
Me.Requery

End Sub

Try that.
 
Top