Toggle a filter

Rusty

Registered User.
Local time
Today, 17:28
Joined
Apr 15, 2004
Messages
207
Hello,

I am trying to get a Command button to toggle the filter "on" and "off" on a form. I have done this by using:

DoCmd.RunCommand acCmdToggleFilter

How do I get this button to enable only if filter is on? I have tried several different things in the On Current event of the form, but to no avail, e.g.

Private Sub Form_Current()
If ????? Then
cmdFilter.Enabled = False
Else
cmdFilter.Enabled = True
End If

End Sub
Can anyone help?

Rusty
:D
 
Try...
Code:
If Me.FilterOn = True Then
    cmdFilter.Enabled = True
Else
    cmdFilter.Enabled = False
End If
 

Users who are viewing this thread

Back
Top Bottom