Date Query

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?
 
J

John W. Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top