return all data from last 5 years from today's date

A

Attila Fust

I want to run a query so it will give me all data from the
last 5 years from today's date without having to specify
the actual dates.

Is there a way to do this?

Thanks,

attila fust
 
J

John Vinson

I want to run a query so it will give me all data from the
last 5 years from today's date without having to specify
the actual dates.

Is there a way to do this?

Easily: a criterion of

BETWEEN DateAdd("yyyy", -5, Date()) AND Date()
 
S

Steve Schapel

Attila,

Use a criteria like this...
Between DateAdd("yyyy",-5,Date()) And Date()
.... or, if there are no records in your data with future dates, this may
suffice...
 
L

Les

Try something like this in the criteria for your date
field:

DateAdd("yyyy",-5,Date())
 
Top