filtering a recordset with dates

M

martinmike2

Hello,

I just can't seem to wrap my head around the date function. Maybe its
just the mondays.

Anyways, I have a report that I would like to show only those records
with a date that is no less than 9 months from the current date. I
know that I can use >=Date() but that returns all records that are
dated past today. I need only the records that are 9 months out, and
only 9 months out. We dont care about 10months, or 8 months, just 9
months.

Any help on this would be greatly appreciated.

Sincerely,
Michael Martin
 
J

John Spencer

Use criteria like that below to get records in the ninth month (1-31 May 2009)
from the current month.

Between DateSerial(Year(Date()),Month(Date())+9,1) and
DateSerial(Year(Date()),Month(Date())+10,0)

If by 9 months out you mean to the day (2009-05-11 to 2009-06-10) then the
following may be what you are looking for
=DateAdd("m",9,Date()) and <DateAdd("M',10,Date())



John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Top