Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove filter through macro

Status
Not open for further replies.

MikeCDPQ

Technical User
Sep 11, 2003
173
CA
I need to find a way to remove a filter from the design view of a form. Using filter remove filter is not good because if you open form in design mode the filter is still there.

I have other macros that open forms base on the first form's filter with

setvalue: forms!form2.filter = forms!form1!filter;

I tried
runcommand: remove filter/sort
Setvalue: Forms!form1.filter = ""
whether it be on form open or close does not matter, so long as I can get rid of the filter value.

Nothing works.

Any idea anyone ?

Thanks for your help.
 
Sometimes the filter in the form's design view is inhereted from the underlying query or table. Have you removed it from their as well?

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
LonnieJohnson

No, the filter that is in design view is the one that was created when I filtered by selection or filtered by form.

Later, I open other forms with a macro that sets the value of the new form's filter to the one I just came from.

Even if I "removed filter/sort" or "cleared grid" it stays in design and my SETVALUE macro picks it up and opens the new forms with a filter that is obsolete.

Any other ideas ?

Thanks for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top