Comparing Dates

Mermogoat

Registered User.
Local time
Today, 11:19
Joined
Dec 1, 2002
Messages
36
Ok, when I am opening a form, in the OpenReport command, as the WHERE paramater I have the following code:

"DateValue([RequestDate]) Between " & StartDate & " And " & EndDate

RequestDate is a field in the query that is the report's recordSource
StartDate and EndDate are variables of the Date type

Can you not compare dates with the Between command, or is there a certain way to do it?

Thanks
 
Have you tried surrounding the dates with pound signs (#)?

"DateValue([RequestDate]) Between #" & StartDate & "# And #" & EndDate & "#"
 
Oh ok, thanks i'll try that. I didn't know to do that.

Why do you need them, anyway?
 

Users who are viewing this thread

Back
Top Bottom