Apply Filter button on Form

G

Guest

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
 
G

Guest

private sub Button_Click()

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

End Sub

Try that.
 

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