Sorry, I thought you were turning the navigation button off by default, then
turning them on when the form is filtered. My code does that. If the reverse
is true and you want to turn the navigation buttons off when you turn the
filter off, then leave them turned on and change the code to:
Me.NavigationButtons = False
The actual line of code that I think you need is:
If Me.FilterOn = True Then Me.NavigationButtons = True
but you'll need to put that into code which calls the filter. As far as I
know, you can check for the filter when the form opens, but there is no
event generated by buttons on the menu or the menu and the form doesn't have
a state checking mode, so you need to run the code from a command button
which calls the filter, and disable the menu buttons. You also should turn
the navigation buttons off by default, or you'll need to change the above
code to:
If Me.FilterOn = False Then Me.NavigationButtons = False
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access