Date Calculations

J

John Castle

Can anyone help me with this please?

I want to enter a date via a parameter dialob box and for
it to return a list of records that have dates less than
the date I entered + 1 week. I have tried <([Enter Date]
+8 to no avail. Once I have fixed this I then want to
have a 2nd list that lists dates between the above
criteria and 1 month ahead ie something like Between
([Enter Date]+8)and ([Enter date])+ 1 month)
 
J

John Spencer (MVP)

Try using the DateAdd Function. Access may not be correctly resolving your
parameter type and may be doing some arithmetic on your Date entry. One other
method would be to declare your parameters -

DateAdd("d",8,[Enter Date])

Between DateAdd("d",-7,[Enter Date]) And DateAdd("m",1,[Enter Date])

or perhaps you mean
Between DateAdd("d",-7,[Enter Date]) And DateAdd("m",1,DateAdd("d",-7,[Enter Date]))
 
Top