View Full Version : Input date range


dlong
02-06-2002, 08:57 AM
I have about 65 queries and I have this in each query BETWEEN[TYPE START DATE]AND[TYPE END DATE]. Is there a way to do this once and apply it to all queries?

KKilfoil
02-06-2002, 09:59 AM
Create a form and put two unbound fields (formatted for a date).

Reference these fields in your queries as follows:

Between Forms![YourNewForm]![StartDate] and Forms![YourNewForm]![EndDate]

If this form is open, it will use the values in the field. If it is not open, Access 97 seems to prompt for the values as if they were typical parameters.

BTW, I used two calender controls rather than text fields in one instance for a slicker user interface.

Rich
02-06-2002, 10:47 AM
Not sure if it's a typo but why use two calendar controls?

dlong
02-06-2002, 12:02 PM
I am very new at this.I have two calendar controls that are used to filter the dates of the table. So, what happens is the query will ask for the start date: 1-1-99 to end date: 2-6-02. This will populate a form with the information.

Rich
02-06-2002, 12:56 PM
One form with a calendar control and two text boxes on it will do. There is an example in the Solutions sample database.
HTN