multiple condition queries

  • Thread starter Thread starter stuart
  • Start date Start date
S

stuart

morning all

hopefully someone out there can offer some assistance

i am building an access application in which i wish to be able to intially
look at all the data in a form view (sorted that bit out), and then be able
to use a variety of drop downs to "filter" the data based on if anythng is or
isnt selected in the drop downs

ive got all the drop downs sorted out the problem comes in the query.......
I want to be able to use 1 query and in that where i have a field i can
either filter on it or not

at the moment i have like "*" & [filter value] &"*". however this does not
bring back all the results. How can i have it that this is bring back
everythign or filter as required

thanks

stuart
 
See:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

The article explains how to set up a search form with several unbound
controls where you can enter the criteria. It then builds a filter string
based on the boxes where you entered something. The sample database
illustrates how to apply that to a form, but you can use it as the
WhereCondition for OpenReport if you want to do that.

Download the sample, and spend some time pulling it apart. It really is
worth learning this technique.
 

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

Back
Top