View Full Version : problem with date query


homer2002
04-22-2003, 08:48 AM
I'm trying to make a (really simple ) query,
but i'm having trouble filtering a date field


the date field is a Long Date (i.e #01/01/2001 6:35:02#)

To find all records corresponsing to a single date is proving tricky.

I need the query set up to ask for a date.

I tried

[Enter Date]

this didnt work

then I tried

>[Enter Date]-1 AND <=[Enter Date]

but access doesn't like my syntax.

I know I need to be performing a broader search as the time is in with the date but can't think of the syntax.

This must be a popular problem.

Has anyone any answers :-)

cheers James

pdx_man
04-22-2003, 12:53 PM
Try:

>DateAdd("d",-1,[Enter Date]) And <DateAdd("d",1,[Enter Date])

Depending on where you are using this, you may have to change the double quotes to single quotes.

HTH