On the form, I would like to have the user to input a date, then it opens a query base on the date entered. What is the best way to do it? Thanks in advance.
I had assumed that you had a form on which the button and the date, you wanted to query, resided. If this not the case simply put the following in the Criteria under date in your query;
If on the query I put the code [enter the date] under creteria, should I make a text box on the form with the same name "enter the date"? Or how can the query find the date user entered? thanks.
Create your query so that it is selecting the data you want.
In the criteria section in the Date column, put the code I gave you previously.
Save the query.
Now run the query (click the apostrophe "!")
The next thing that will happen is a small dialogue box with appear with the text you put in the square brackets.
Click OK and bingo job done.
As an aside do not use names like Date, Time etc. as field name as these are reserved by Access as function names and will complicate the future writing of code.