strSQL = "...whatever.. WHERE DateA > #" & DateB & "# AND DateA < #" & DateC & "#;"
Note however Access in SQL strings expects dates to be in US format, no matter what the locale settings of the PC, if you are not in the US you may need to slightly modify this to force US style mm/dd/yy so
Format(DateB,"mm/dd/yy" and similarly for DateC
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
> Note however Access in SQL strings expects dates
> to be in US format, no matter what the locale settings
> of the PC, if you are not in the US you may need to
> slightly modify this to force US style mm/dd/yy
that's not quite right
access has no problem whatsoever with the ISO standard format yyyy-mm-dd
in fact no database i'm aware of has any trouble with that format, so why take the chance on getting mm/dd mixed up with dd/mm?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.