Parameter Query

M

mike

My orderDetail table has 3 date fields (all formated the same i.e. short
date). How, in the query design, do I exclude records from be reported in a
query if 1 date field is empty?
 
C

Cheese_whiz

Add "Is Not Null" (no quotes) in the criteria row of the column where the
date in question is (in query design mode in the grid area).

Least I think that should work.

CW
 
F

fredg

My orderDetail table has 3 date fields (all formated the same i.e. short
date). How, in the query design, do I exclude records from be reported in a
query if 1 date field is empty?

As criteria on that date field, write:
Is Not Null

If you wish to exclude all records where any one of the 3 date fields
is blank, then write:
Is Not Null
on the same criteria row for each date field.
 
K

Ken Sheridan

If you want to exclude rows from the result set where *any* of the three date
columns is Null you can also make use of the fact that Nulls propagate in
arithmetic expressions, so Null + anything = Null, e.g.

SELECT *
FROM YourTable
WHERE Date1 + Date2 + Date3 IS NOT NULL;

Ken Sheridan
Stafford, England
 

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