Fixed future Date Ranges

tome20

New member
Local time
Today, 13:23
Joined
Sep 16, 2007
Messages
7
I'm trying to run a report that returns all entries with a due date of 60 days from one week from today. ie: If today is January 1st, my report would run from 8 Jan to 8 Mar (give or take a day...)

I currently have a report that pulls all records within the next sixty days (ie: if today is still the first, it shows me 1 Jan to 1 Mar). I just need to figure out how to shift the date range by a week.

The current SQL entry is <DateAdd("d",60,Date())

Thanks for the help!
 
From MS Access Help:

DateAdd Function Example
This example takes a date and, using the DateAdd function, displays a corresponding date a specified number of months in the future.

Dim FirstDate As Date ' Declare variables.
Dim IntervalType As String
Dim Number As Integer
Dim Msg
IntervalType = "m" ' "m" specifies months as interval.
FirstDate = InputBox("Enter a date")
Number = InputBox("Enter number of months to add")
Msg = "New date: " & DateAdd(IntervalType, Number, FirstDate)
MsgBox Msg


And you have: DateAdd("d",60,Date())

So off the top you want --- DateAdd("d",60,(Date()+ 7))
 
It seems simple enough, but it's not taking. I'm still pulling records within the next seven days.

Should it make any difference that I'm using Access '02?
 
I think there may be a problem with your SQL string can you post it?
 
SQL String as follows- (There could be a typo here. I had to hand-type it on this web connected PC after reading it off of a stand-alone)

SELECT AllTasks.Status, AllTasks.SuspenseDate, AllTasks.SuspenseTime, AllTasks.LogID, AllTasks.EntryDate, AllTasks.Subject, AllTasks.ActionTo, AllTasks.AssisgnedToAnalyst, AllTasks.Annotations, Users.UserID, Format(Now(),”h”) AS Expr1, AllTasks.Tasker_no, AllTasks.Customer, AllTasks.Classification, Customers.CustomerOrg, FinalCust.FinalCustOrg, AllTasks.ReocurringTask
FROM FinalCust RIGHT JOIN (Customers RIGHT JOIN (Users RIGHT JOIN AllTasks ON Users.LastName = AllTasks.AssignedToAnalyst) ON Customers.CustumerID = AllTasks.CustomerID) ON FinalCust.FunalCustID = AllTasks.FinalCustID
WHERE (((AllTasks.Status)’’OPEN’) AND ((AllTasks.SuspenseDate)<DateAdd”d”,60(Date()+7))) AND ((AllTasks.ReocurringTask)=False)) OR (((Format(“suspense time”,”h”))<Format(Now(),”h”)));
 

Users who are viewing this thread

Back
Top Bottom