P
Pam
I created a query using the following information provided by Allen Browne in
a previous post here. However, when I run the query, I get ALL the records
that have a date in my date field, no matter what the date is. For example,
I input the StartDate as 11/1/08 or 11/1/2008 and the EndDate as 11/30/08 or
11/30/2008 and I still get records from 1/1/2008 and 12/5/2008. I get every
record that has a date. The only thing I don't get is records where the date
field is empty. What am I doing wrong?
To create the parameter query:
Create a query to use as the RecordSource of your report.
In query design view, in the Criteria row under your date field, enter:
Choose Parameters from the Query menu, and declare two parameters of type
Date/Time:
StartDate Date/Time
EndDate Date/Time
a previous post here. However, when I run the query, I get ALL the records
that have a date in my date field, no matter what the date is. For example,
I input the StartDate as 11/1/08 or 11/1/2008 and the EndDate as 11/30/08 or
11/30/2008 and I still get records from 1/1/2008 and 12/5/2008. I get every
record that has a date. The only thing I don't get is records where the date
field is empty. What am I doing wrong?
To create the parameter query:
Create a query to use as the RecordSource of your report.
In query design view, in the Criteria row under your date field, enter:
= [StartDate] < [EndDate] + 1 (This is what I use in the "criteria" row)
Choose Parameters from the Query menu, and declare two parameters of type
Date/Time:
StartDate Date/Time
EndDate Date/Time