DoCmd.FilterOn=False

D

Denver

I have a Form with a subform on it i have a cmdRemove Filter
with this code

DoCmd.FilterOn=False

but when i make filter on my subform and click cmdRemove Filter it does
function.
What do i miss on my codes?

Hope anyone is kind to help me on how to write my code to accomplish this
work.

thanks
 
A

Allen Browne

FilterOn is a property of the form.
It is not a method of DoCmd.

Try something like this:
Me.FilterOn = False
or:
Forms!Form1.FilterOn = False
or, if you are using a subform:
Forms!Form1!Sub1.Form.FilterOn = False
 

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