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  

2 independent criteria



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2010, 02:17 AM posted to microsoft.public.access.queries
Rubem
external usenet poster
 
Posts: 9
Default 2 independent criteria

Hi,

I have a query with the following fields: Date, Part Number, description,
etc..
I need a 2 criteria.. 1 for Date and 1 for Part Number and I want them to be
independent. In another words, if I want only a report in a specific range I
would enter the dates or if I just want a report with only the part number I
would enter the part number or if I need a report with both data, I would
enter both data.

Any suggestion?

Thank you for your help.

Rubem
  #2  
Old May 4th, 2010, 05:11 AM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default 2 independent criteria

Take a look at this article:
Search criteria
at:
http://allenbrowne.com/ser-62.html

It explains how to set up a form where the user can enter whichever criteria
they want, and you build a filter string from only the boxes where they
entered something. The filter can then be applied to a form or to a report.

If you don't want to go that way, the last part of the article explains how
to design the WHERE clause of the query so you can do the whole thing in a
query if you must go that route.

--
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.


"Rubem" wrote in message
news
Hi,

I have a query with the following fields: Date, Part Number, description,
etc..
I need a 2 criteria.. 1 for Date and 1 for Part Number and I want them to
be
independent. In another words, if I want only a report in a specific
range I
would enter the dates or if I just want a report with only the part number
I
would enter the part number or if I need a report with both data, I would
enter both data.

Any suggestion?

Thank you for your help.

Rubem


 




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 12:52 AM.


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