PREVIOUS MONTH TIME FRAME IN QUERY?

  • Thread starter Thread starter Ned Beck
  • Start date Start date
N

Ned Beck

Hi ,

I am trying to make querry which should give me the results from the whole
previous month no mater when I am running that querry.in the current month.
So I need the way to avoid typing date time frame for the previous month.
Please help. Thank You in advance.

Nedzad
 
....
WHERE [DateField]
BETWEEN DateSerial( Year( Date() ), Month( Date() ) - 1, 1 )
AND DateSerial( Year( Date() ), Month( Date() ), 0 )
 
WORKS PERFECT!
THANK YOU!
Van T. Dinh said:
...
WHERE [DateField]
BETWEEN DateSerial( Year( Date() ), Month( Date() ) - 1, 1 )
AND DateSerial( Year( Date() ), Month( Date() ), 0 )

--
HTH
Van T. Dinh
MVP (Access)



Ned Beck said:
Hi ,

I am trying to make querry which should give me the results from the whole
previous month no mater when I am running that querry.in the current month.
So I need the way to avoid typing date time frame for the previous month.
Please help. Thank You in advance.

Nedzad
 
Back
Top