A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multiple condition queries



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2008, 10:34 AM posted to microsoft.public.access.queries
Stuart
external usenet poster
 
Posts: 157
Default multiple condition queries

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
  #2  
Old July 10th, 2008, 10:49 AM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default multiple condition queries

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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"stuart" wrote in message
...
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.