Searching for Date Range

J

jtshockey

I'd like to set up a function to allow the user to search for files
based on a due date. I would like it so that the user can search for
files due in the following three weeks of the current date. Does
anyone know how I would be able to set this up?
 
D

Douglas J. Steele

Use

BETWEEN DateAdd("ww", -3, Date) AND Date

as the criteria for your date field.
 
F

fredg

I'd like to set up a function to allow the user to search for files
based on a due date. I would like it so that the user can search for
files due in the following three weeks of the current date. Does
anyone know how I would be able to set this up?

You want dates between today and 3 weeks (21 days) into the future?

Create a query.
As criteria on the [DueDate] field, write:
Between Date() and DateAdd("d",21,[DueDate])
 
F

fredg

I'd like to set up a function to allow the user to search for files
based on a due date. I would like it so that the user can search for
files due in the following three weeks of the current date. Does
anyone know how I would be able to set this up?

You want dates between today and 3 weeks (21 days) into the future?

Create a query.
As criteria on the [DueDate] field, write:
Between Date() and DateAdd("d",21,[DueDate])

Oops. Naughty fingers hitting keys.
Should be:

As criteria on the [DueDate] field, write:
Between Date() and DateAdd("d",21,Date())
 
Top