Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Between inputdate1 and inputdate2 2

Status
Not open for further replies.

Smarty

Programmer
Apr 12, 2001
191
BE
Hi,

I have a query but i want to input some criteria, so i would like to set as a criteria 'BETWEEN date1 AND date2' where I input date1 and date2 as inputparameters. But how do I do it exaclty? Because everything I do returns an error message that the query is to difficult to evaluate...
 
Hi,
Open the query in the design view.
Enter the following line in the criteria of DateField of the query.

Between [Enter Date1] And [Enter Date2]

This will prompt two input boxes to enter the date.
Enter the Dates and click OK

Also you can use a form to pass the date parameters.

On the form put a CommandButton to ope the query.
Put two unbound text boxes on the form name them Date1 and Date2
Between [YourFormName]![Date1] And [YourFormName]![Date2]

Open the Form on normal view enter the dates in the textboxes and click the command button. This will open the query with data between the dates.
Make sure to change the YourFormName to the Name of your form.

Regards

Zameer Abdulla

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top