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
|
|||
|
|||
Date range for a report
Hi
I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks |
#2
|
|||
|
|||
Date range for a report
Assuming that the follow up field is actually a date/time data type, try this
in the criteria: Between Date() - 60 and Date() + 7 -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Tracey" wrote: Hi I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks |
#3
|
|||
|
|||
Date range for a report
On Wed, 30 Dec 2009 13:45:01 -0800, Tracey
wrote: Hi I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks = DateAdd("d", -60, Date()) AND DateAdd("d", 8, Date()) will work (even if the datefield contains a time portion, hence the 8) -- John W. Vinson [MVP] |
#4
|
|||
|
|||
Date range for a report
Thanks guys!
Happy New Year! "John W. Vinson" wrote: On Wed, 30 Dec 2009 13:45:01 -0800, Tracey wrote: Hi I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks = DateAdd("d", -60, Date()) AND DateAdd("d", 8, Date()) will work (even if the datefield contains a time portion, hence the 8) -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|