laurastreng
Board Regular
- Joined
- Apr 1, 2004
- Messages
- 58
Hello- I am running a report weekly that is capturing the previous year's worth of data. I am using this in my date field: >=Format(DateAdd("m", -12(Date()),"yyyy-mm-dd") This worked great on my first run. However, now that I am preparing to run this query a week later, if I run it as is, I will lose 7 days worth of data between the previous and present run. (ran it last on 3/31/09, planning to run it today, 4/8/09). I don't want to hard code a date anywhere if I can help it. Is there any way to get Access to capture those 7 days?
Laura S
Richmond, VA
I just had a thought but still not sure how to implement it: I could enter a field to the query prompting for date of the last run. How can I get the field that has >=Format(DateAdd("m", -12(Date()),"yyyy-mm-dd") to look at that date as well when pulling back the data? So I'd enter 3/31/09 as the last run date, then somehow, I need to tell Access to return data from 4/1/08 - 4/8/09 without hard coding dates.
Laura S
Richmond, VA
I just had a thought but still not sure how to implement it: I could enter a field to the query prompting for date of the last run. How can I get the field that has >=Format(DateAdd("m", -12(Date()),"yyyy-mm-dd") to look at that date as well when pulling back the data? So I'd enter 3/31/09 as the last run date, then somehow, I need to tell Access to return data from 4/1/08 - 4/8/09 without hard coding dates.