Removing Filter from a subform (datasheet)

Patrick O'Dea
Patrick O'Dea used Ask the Experts™
on
I have a form that has a subform.
The subform is a datasheet.
The user can use the standard "filter" funtions in the datasheet.

I need some VBA so that when I click on a button on the MAIN form ... the filters will be removed from the Subform.

How do I use VBA to remove all filters from the subform?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
The button is already there - below the datasheet: Filter.
Just click it, and the filter is turned off.

/gustav
Top Expert 2016
Commented:
Me.<NameOfSubformControl>.Form.Filter = ""
me.<NameOfSubformControl>.Form.FilterOn=True

Author

Commented:
Thanks, just perfect.

(Much friendlier for the novice users of my system)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial