I have an input variable that represents a StartDate. When I try to look at
StartDate+1, the query gags. I need to look at data for each of the 4 days
following the StartDate. How do I represent this expression?
Ofer - 18 Aug 2005 21:12 GMT
Try and use the DateAdd function
DateAdd("d",4,StartDate)

Signature
In God We Trust - Everything Else We Test
> I have an input variable that represents a StartDate. When I try to look at
> StartDate+1, the query gags. I need to look at data for each of the 4 days
> following the StartDate. How do I represent this expression?
Ken Snell [MVP] - 18 Aug 2005 21:16 GMT
Gags? If StartDate is a valid date type, then StartDate + 1 is perfectly
valid.
Perhaps you want to look at the DateAdd function? It's explained in the Help
file... it will add "date" intervals to a date, such as adding a day.

Signature
Ken Snell
<MS ACCESS MVP>
>I have an input variable that represents a StartDate. When I try to look
>at
> StartDate+1, the query gags. I need to look at data for each of the 4
> days
> following the StartDate. How do I represent this expression?
Rick B - 18 Aug 2005 21:17 GMT
I would think you would not want to add to the startdate, you would want to
pull all the start dates that are equal to today, tomorrow, the next, etc.
The criteria under the Start date would be...
Date() or Date()+1 or Date()+2 or Date()+3
This would pull any record with a start date of today, tomorrow, etc.
If, for some reason, you still need to add days to your "startdate", use
the DateAdd function.
=DateAdd("d",[StartDate],1)
=DateAdd("d",[StartDate],2)
etc.

Signature
Rick B
> I have an input variable that represents a StartDate. When I try to look at
> StartDate+1, the query gags. I need to look at data for each of the 4 days
> following the StartDate. How do I represent this expression?
cdielman - 18 Aug 2005 22:47 GMT
Fixing the data type to date/time corrected the problem. Thanks very much
for your help.
> I have an input variable that represents a StartDate. When I try to look at
> StartDate+1, the query gags. I need to look at data for each of the 4 days
> following the StartDate. How do I represent this expression?