VBA Code to clear all filters

S

stockton12

I am looking for a code to clear all filters when a form is loaded.

Right now I have this code which works OK:

Private Sub Form_Current()
cboUser = txtCustomerID
Me.FilterOn = False

The problem that I have is when a user attempts to put a filter on a
particular field, the user sees, "Clear all fields from <field name>" This
has no noticable impact to the fuctionality of the form, it is just an
inconvenience to the user and may cause questions.

Is there a way to have all of the filters removed so the user does not see
this?

Thanks for your assistance in advance.
 
G

Gina Whipp

stockton12,

Normally, when I want the filters to be clear when the for opens I put the
Me.Filter = "" on the On_Unload of the form. Is there a specific reason you
want the form to clear once it's opened?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

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