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

Conditional Queries Help

Status
Not open for further replies.

ValSchmidt

Programmer
Nov 30, 2000
1
US
Hello,

I'm a fledgling access developer so please bare with me.

I need to allow users to optionally select one or more criteria on which to filter a table. In effort to do this I have created combo boxes for each criteria the user might want to seach by, and a list box for the results.

It is easy to return a set of records if I specify criteria in every combo box. However, I am completely stumped as to how to return records on only some of the criteria. When no criterion is specified in a given combo box how do I get the query to return all records (i.e. to ignore filtering on the blank combo box and to filter based on the other criteria)?

Any help anyone could provide would be greatly appreciated.

Val
 
Val,

If you are up to 'it', just look at the values from each of he combo boxes. For any which are "", just replace it with "*", so this part of the criteria is 'ALL'.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top