Problem with ApplyFilter

periksson

New member
Local time
Today, 12:44
Joined
Oct 15, 2010
Messages
1
Hello,

I have a continuous form with four buttons in the form footer that each activate a line of ApplyFilter, something like:

DoCmd.ApplyFilter , "[Status]=1"
DoCmd.ApplyFilter , "[Status]=2"
...

These buttons work just fine, but I also want to have a button that clears all filters, so I tried doing one like:

DoCmd.ShowAllRecords

The problem is that it doesn't seem to work. Perhaps it works for a fraction of a second before it changes back to the previous filter, but I'm not sure.

Anyone has any idea what is wrong?

Also it seems the latest filter is saved in the form properties under "Filter", which causes some problems. Is there any way to prevent this from being saved?

Thanks
 
Clear the filter and/or turn off the filter.

Code:
Me.Filter = ""
Me.FilterOn = False
 

Users who are viewing this thread

Back
Top Bottom