Apply Filter button on Form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
private sub Button_Click()

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

End Sub

Try that.
 
Back
Top