Parameter query date range wrong

M

Mark

Hi,

I'm trying to build an access database at work for our
calibration dept. Regardless of the dates I specify as
parameters in the query it returns others outside the
range. i.e. Between [Start:] And [End:]using 1/1/2004 &
2/1/2004 will return 3/4/2005 or 2/1/2001. It doesn't seem
to matter what I put in as the range. I've trying putting
it like >[Start:] And <[End:] Its access 2002 and I'm
using the short date format. Any help is appreciated.

Regards,
Mark
 
A

Allen Browne

To ensure that Access understands the parameters correctly, declare them as
dates.

In query design view, choose Parameters from the Query menu.
Enter 2 rows into the dialog:
[Start:] Date/Time
[End:] Date/Time

We are assuming that the field is a Date/Time field.
 
T

Tom Ellison

Dear Mark:

Two things to check first:

- Declare the parameters [Start] and [End] to be date/time datatypes.

- Check that the column containing these dates is also a date/time
datatype.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Top