2 independent criteria in query


R

Rubem

Hi,

I have a query with the following fields: Date, part number, description,
problem description, etc...
I want to put 2 indepedent criteria in the same query. In another word, If I
want only the date range I would enter the date range or if I want just the
problem description of a particular part, I would enter the part number.

Any suggestion?

Thank you.

Rubem
 
Ad

Advertisements

A

Al Campagna

Rubem,
First, don't name a field "Date" It's a reserved word in Access.
Try PurchaseDate, or BirthDate, etc... (I'll use XDate)

You could use parameters.
Against the XDate...
Between NZ([Start Date], #1/1/1940#) AND NZ([End Date], #1/1/2100#)
Against PartNo...
Like "*" & [Enter Part No] & "*"

When prompted for a parameter value...
If no [Start Date] and [End Date] are entered, all XDate values are
returned.
If no [Enter Part No] is entered, all PartNo values are returned.
If no parameters are entered, all records will be returned.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Ad

Advertisements

T

Tom van Stiphout

On Wed, 5 May 2010 05:30:01 -0700, Rubem

My suggestion is not to start a new thread, but continue the
discussion in the first one, where I answered your question.

-Tom.
Microsoft Access MVP
 

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

Top