ApplyType is always 1 for Toggle Filter

B

bhammer

Acc2003
I'm trying to catch when the user clicks the Toggle Filter toolbar button
(it's not a custom button) so I can run a procedure. The main form cannot be
filtered. The subdatasheet has the records that get filtered. On the main
form I have a procedure for the Apply Filter event that tests for the
ApplyType. As far as I can tell it can only be two values 1=acApplyFilter and
0=acShowAllRecords. I simply have a MsgBox that shows me what the ApplyType
is when the Apply Filter event is triggered. Here's the strange part:

If no filter applied, and user applies filter, ApplyType = 1 (like it should)
If a filter is applied, and user pushes Toggle Filter, ApplyType = 1
(??should be 0. The filter is correctly removed, though).
If a filter is applied, and the user right-clicks in the subdatasheet and
selects Remove Filter/Sort, ApplyType = 0 (like it should).

How can I differentiate the toggle events if ApplyType is the same in both
cases?
 

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