Applying Filters and Turning them off

  • Thread starter Jarrod Shumaker
  • Start date
J

Jarrod Shumaker

I have a form that uses 2 buttons, one button applies a filter according to
a query the other button is "supposed" to turn the filter off then show all
records.

The following is the code for each of the buttons



Apply Filter Button

Private Sub Command429_Click()

If IsNull(Me![FilterCase]) Then

DoCmd.ApplyFilter "ReportHorryCheckingTMS", ""
FilterCase = ""

Else

DoCmd.ApplyFilter "FilterCaseNumHorry", ""
FilterCase = ""

End If

End Sub



Show All Records Button

Private Sub ShowAll_Click()

DoCmd.ShowAllRecords
Me.FilterOn = False

End Sub

(i've tried putting the "Me.FilterOn = False" before the "showallrecords" to
no avail.)
 

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