Multiple criteria to filter Query records

C

CW

We carry out Quality Control by either of two methods on each of our jobs - a
phone call for certain types of work, a mailed questionnare for others.
I have dates for each of these in my job history table and form, where users
record either the date that a phone call was made, or the date that a
questionnaire was returned by the customer.
We need to follow up on the jobs where neither of these has been achieved,
i.e. where both those fields are null.
So I am building a simple Query to find those records, but I can't work out
how to set the criteria so that it finds only the records where BOTH dates
are blank. I have tried some "either/or" expressions and some "and"
expressions, but no good - I'm sure somebody has the answer to this???
Many thanks
CW
 
J

Jeff Boyce

I'm not exactly clear on the underlying data structure, but it sounds like
you have two fields that could hold dates.

In your query (try using the query design window), all on the same criterion
row, underneath each date field (you'll have to add both date fields) use
"Is Null" (without the quotes). The effect should be to find all records in
which the date1 field is null and the date2 field is null.

Be aware that "null" and "zero-length string" look alike on the screen. Are
you certain the field is "null"?

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
C

CW

Thanks Jeff - that does the job nicely!
CW

Jeff Boyce said:
I'm not exactly clear on the underlying data structure, but it sounds like
you have two fields that could hold dates.

In your query (try using the query design window), all on the same criterion
row, underneath each date field (you'll have to add both date fields) use
"Is Null" (without the quotes). The effect should be to find all records in
which the date1 field is null and the date2 field is null.

Be aware that "null" and "zero-length string" look alike on the screen. Are
you certain the field is "null"?

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 

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