PC Review


Reply
 
 
Hendrix
Guest
Posts: n/a
 
      13th Jun 2011
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?
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      13th Jun 2011
On Mon, 13 Jun 2011 07:59:12 -0700 (PDT), Hendrix <(E-Mail Removed)> wrote:

>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/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a query based on a start date and end date. The date are the . santana Microsoft Access 4 7th Feb 2009 10:23 PM
in a query test on date to see if it falls between two date date? =?Utf-8?B?ZGF0ZSBjYWxjIGluIHF1ZXJ5IGluIGFjY2VzcyAy Microsoft Access Queries 1 1st Jun 2006 04:34 AM
Run Query from date to date, Print the from date to date in the header of the report? Dustin Swartz Microsoft Access Queries 1 25th Jan 2005 07:06 PM
Query week to date, month to date, year to date hours =?Utf-8?B?VHk=?= Microsoft Access Queries 1 15th Dec 2004 03:46 AM
Syntax error in date in query expression for Swiss Italian date format Timothy M Hodgson Microsoft Access Queries 2 25th Mar 2004 04:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 PM.