When removing filter with icon on toolbar, main form filter is removed but
filter for combobox is not removed.
When I first set the filter 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,
filter is removed from both. Then I do get ApplyType=acShowAllrecords.
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.
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.
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.
Can anybody explain this behavior, or offer a workaround ?
filter for combobox is not removed.
When I first set the filter 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,
filter is removed from both. Then I do get ApplyType=acShowAllrecords.
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.
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.
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.
Can anybody explain this behavior, or offer a workaround ?