A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Date criteria



 
 
Thread Tools Display Modes
  #1  
Old July 18th, 2008, 01:49 PM posted to microsoft.public.access,microsoft.public.access.queries
Jasper Recto
external usenet poster
 
Posts: 257
Default Query Date criteria

I have a query that has a date criteria that is in a range. For example it
runs from 1/01/08 to 03/31/08.

Is it possible to change the criteria so it always run the past 3 months
from the date is was run. So for example, if I ran it today (07/18/08) the
criteria field would select the last 3 months from today, so 04/18/08 to
07/18/08.

Can you do that in the query?


OR
is it possilbe to have it prompt the user for which quarter of the year to
run?


Thanks,
Jasper


  #2  
Old July 18th, 2008, 02:08 PM posted to microsoft.public.access,microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 744
Default Query Date criteria

On Jul 18, 7:49*am, "Jasper Recto" wrote:
I have a query that has a date criteria that is in a range. *For example it
runs from 1/01/08 to *03/31/08.

Is it possible to change the criteria so it always run the past 3 months
from the date is was run. *So for example, if I ran it today (07/18/08) the
criteria field would select the last 3 months from today, so 04/18/08 to
07/18/08.

Can you do that in the query?

OR
is it possilbe to have it prompt the user for which quarter of the year to
run?

Thanks,
Jasper


SELECT Contacts.EMailAddress, Contacts.InterviewDate
FROM Contacts
WHERE (((Contacts.InterviewDate) Between DateAdd("m",-3,Date()) And
Date()));
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.