Microsoft Office Tutorials and References
In Depth Information
Results of the parameter query
Sarah asks what happens if she doesn’t enter a value in the dialog box when she
runs the qryCustomersByNameParameter query. You can run the query again to
show Sarah the answer to her question.
6. Switch to Design view, and then run the query. The Enter Parameter Value dialog
If you click the OK button or press the Enter key, you’ll run the parameter query
without entering a value for the City field criterion.
7. Click the OK button. Access displays no records in the query results.
When you run the parameter query and enter Holland in the dialog box, Access runs
the query the same way as if you had entered “Holland” in the City Criteria text box in
the design grid by displaying all Holland customer records. When you do not enter a
value in the dialog box, Access runs the query the same way as if you had entered null in
the City Criteria text box. Because none of the records has a null City field value, Access
displays no records. Sarah asks if there’s a way to display records for a selected City field
value when she enters its value in the dialog box and to display all records when she
doesn’t enter a value.