Enter Start Date and Auto Fill the End Date

J

Jet

I would like to enter a date and automatically have a query return records
between that day and 5 days out. I know I can have 2 prompts and have the
user enter a start and end date.....but since the end date is always 5 days
from the start date it would be nice for them to just enter the start date.
 
F

fredg

I would like to enter a date and automatically have a query return records
between that day and 5 days out. I know I can have 2 prompts and have the
user enter a start and end date.....but since the end date is always 5 days
from the start date it would be nice for them to just enter the start date.

As criteria on the date field:

Between [Enter Date] and DateAdd("d",5,[Enter Date])

You'll get just the one prompt.
 
M

Mark J

The DateAdd function will not return an invalid date. The following example
adds one month to January 31:

DateAdd("m", 1, "31-Jan-95")
 
J

Jet

Thank you Fred.

fredg said:
I would like to enter a date and automatically have a query return records
between that day and 5 days out. I know I can have 2 prompts and have the
user enter a start and end date.....but since the end date is always 5 days
from the start date it would be nice for them to just enter the start date.

As criteria on the date field:

Between [Enter Date] and DateAdd("d",5,[Enter Date])

You'll get just the one prompt.
 
Top