how to remove filter sort

  • Thread starter Thread starter a
  • Start date Start date
A

a

I have 2 form (form and subform) How can I remove filter sort from (sub
form) by using command button in main form

thank you
 
Try:
Me.[Sub1].Form.FilterOn = False
replacing Sub1 with the name of your subform control.

That should work unless you have the main form filtered as well. If you do
Access gets confused. Details:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html
 
dear allen browne
Me.[Sub1].Form.FilterOn = False
doesn't do any thing (no thing happens)
any more help

Allen Browne said:
Try:
Me.[Sub1].Form.FilterOn = False
replacing Sub1 with the name of your subform control.

That should work unless you have the main form filtered as well. If you do
Access gets confused. Details:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

a said:
I have 2 form (form and subform) How can I remove filter sort from (sub
form) by using command button in main form
 
Okay, lets get more specific:
Was it a filter or sorting you wanted to remove?
You need to use OrderByOn for sorting.

If that doesn't work, is the form bound to a table/query?
Is the subform bound?
You can't use filters and sorting for unbound forms.

If that's still not the issue, open the Immediate Window (Ctrl+G) and ask
Access what's going on. For example, enter:
? Forms![Form1]![Sub1].Form.FilterOn
replacing Form1 with the name of your main form, and Sub1 with the name of
your subform control.

Finally, if you discover that the filtering/sorting is on in both the main
form and the subform, refer to the link.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

a said:
dear allen browne
Me.[Sub1].Form.FilterOn = False
doesn't do any thing (no thing happens)
any more help

Allen Browne said:
Try:
Me.[Sub1].Form.FilterOn = False
replacing Sub1 with the name of your subform control.

That should work unless you have the main form filtered as well. If you
do Access gets confused. Details:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html

a said:
I have 2 form (form and subform) How can I remove filter sort from (sub
form) by using command button in main form
 
Back
Top