Date Query

  • Thread starter Thread starter Hendrix
  • Start date Start date
H

Hendrix

I have a table with a date field. I will be running the query from
time to time and would like to set it up so that it extracts records
where the date is 40 yrs before the current date. Is it possible set
this type of query?
 
I have a table with a date field. I will be running the query from
time to time and would like to set it up so that it extracts records
where the date is 40 yrs before the current date. Is it possible set
this type of query?

Sure. Use a criterion of

=DateAdd("yyyy", -40, Date())

See the VBA help for DateAdd, it has a number of choices.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top