Remove Filter/Sort Not Working Correctly

jknow

New member
Local time
Today, 17:20
Joined
Oct 23, 2007
Messages
9
When I press the remove filter toolbar button the combobox does not remove the filter, but if I use the Reports menu command it removes the filter.

When I press the filter toolbar button I get an ApplyFilter event with
ApplyType = acApplyFilter. When I press the filter toolbar button again to
remove the filter I get the ApplyFilter Event with ApplyType=acApplyFilter
again, when I expected it to be acShowAllRecords. If I remove the filter
using the equivalent menu command, I do get ApplyType=acShowAllrecords.

Can anybody explain this behavior, or offer a workaround ?
 
Have you tried using

Me.Filter = ""
Me.FilterOn = False
 
Yes, the problem is that I have to check the filter and whether it is on in order to build my SQL statement that is the source for my combobox. There is a main form with four subforms on it. After update of the combobox, the code goes through form_current of all the forms until it has finished and is on the correct record. (The combobox is used as a quick search tool - using recordset.clone and .bookmark). It may go through form_current of the main form several times before it has completed this iteration.
 
More info:

I have tried using
Me.Filter = ""
Me.FilterOn = False
at various times and in various places, but the form believes the filter is off (and looking at the main form - all records are shown), but the combobox still has the list filtered.

As I said above, all works well if I use the menu command, but if I use the filter icon on the toolbar, the combobox and form are out of sync and the form locks up if you try using combobox again. If I move to another record using the record selectors, all is well again and filter is removed from combobox.
 

Users who are viewing this thread

Back
Top Bottom