Enter Start Date and Auto Fill the End Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
The DateAdd function will not return an invalid date. The following example
adds one month to January 31:

DateAdd("m", 1, "31-Jan-95")
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top