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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Listing dates greater than 6 months from today
I have written criteria as follows....[enter date greater than 6 months]....
when run I enter a date 6 months from today and it shows the records I need. I would like this to be simplified....but can't figure out how. What I would like is when I run the query it automatically calculates and shows only those records that are greater than 6 months from today - rather than my inputting a date param each time. The field is a standard mm/dd/yyyy field. I am not familiar with using the sql in the background...but can try if that is the assistance provided. If this does not make sense let me know--- thank you in advance for your help! |
#2
|
|||
|
|||
Listing dates greater than 6 months from today
Use one of these as your criteria --
Date()-180 OR DateAdd("m", -6, Date()) These are 180 days or 6 months. "Danielle" wrote: I have written criteria as follows....[enter date greater than 6 months].... when run I enter a date 6 months from today and it shows the records I need. I would like this to be simplified....but can't figure out how. What I would like is when I run the query it automatically calculates and shows only those records that are greater than 6 months from today - rather than my inputting a date param each time. The field is a standard mm/dd/yyyy field. I am not familiar with using the sql in the background...but can try if that is the assistance provided. If this does not make sense let me know--- thank you in advance for your help! |
#3
|
|||
|
|||
Listing dates greater than 6 months from today
Try:
DateAdd("m", 6, Date()) Or, if you meant more than 6 months ago: DateAdd("m", -6, Date()) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Danielle" wrote in message ... I have written criteria as follows....[enter date greater than 6 months].... when run I enter a date 6 months from today and it shows the records I need. I would like this to be simplified....but can't figure out how. What I would like is when I run the query it automatically calculates and shows only those records that are greater than 6 months from today - rather than my inputting a date param each time. The field is a standard mm/dd/yyyy field. I am not familiar with using the sql in the background...but can try if that is the assistance provided. If this does not make sense let me know--- thank you in advance for your help! |
#4
|
|||
|
|||
Listing dates greater than 6 months from today
Perfect!!! Many thanks!!
"KARL DEWEY" wrote: Use one of these as your criteria -- Date()-180 OR DateAdd("m", -6, Date()) These are 180 days or 6 months. "Danielle" wrote: I have written criteria as follows....[enter date greater than 6 months].... when run I enter a date 6 months from today and it shows the records I need. I would like this to be simplified....but can't figure out how. What I would like is when I run the query it automatically calculates and shows only those records that are greater than 6 months from today - rather than my inputting a date param each time. The field is a standard mm/dd/yyyy field. I am not familiar with using the sql in the background...but can try if that is the assistance provided. If this does not make sense let me know--- thank you in advance for your help! |
Thread Tools | |
Display Modes | |
|
|