Where??

  • Thread starter Thread starter Philo Hamel via AccessMonster.com
  • Start date Start date
P

Philo Hamel via AccessMonster.com

Hey,

Need some help here. I'm trying to meke a "Where" statement in which the
first 3 months of the current year are selected. This is what I thought of
myself, but it's wrong and won't work.

"... Between (#01-01-# + Year() + #00:00:00#) and (#31-03-# + Year() +
#23:59:59#)"

I tried it withou the "Year()" part (see below) and that worked fine.

"... Between (#01-01-2005 00:00:00#) and (#31-03-2005 23:59:59#)"

Some advice please.
Thanks in advance,
Philo
 
Try this:
Between DateSerial(Year(Date()),1,1) and DateSerial(Year(Date()),3,31)

You should avoid using string concatenating to derive date values.
 
Thanks a million, I'll give it a go tomorrow!

Later,
Philo
 
Back
Top