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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying Filter from VBA that will filter on more than one control criteria

Status
Not open for further replies.

bhujanga

Programmer
Oct 18, 2007
181
US
I have a form in whcih I'm putting several command buttons to use to make various commonly desireable filters.
I use the Docmd.ApplyFilter command to acheive this.
It works fine as long as I want only one control to define the filter. I can't seem to find syntax that allows you to string two or more filter criteria together, and if I use to separate commands the second one automatically nullifies the first one before it takes effect. Is there a syntax ot better method to do this?
 
Use the AND operator when building the ConditionWhere named parameter of the ApplyFilter method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top