| Applies to |
| Microsoft Access 97 and 2000 |
A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field. Parameter queries are handy when used as the basis for reports. For example, you can create a regional earnings report based on a parameter query. When you print the report, Access displays a dialog box asking for the country or region that you want the report to cover. You enter a country or region and Access prints the appropriate report. You can also display and print a parameter from the report's underlying query in the report.
To display the criteria for a report in the report header
- Create the criteria parameters in the report's underlying query.
For more information about creating criteria parameters in a query, type create parameter query in the Office Assistant or on the Answer Wizard tab in the Help window, and then click Search.
- Open the report in Design view.
- Create an unbound text box for each parameter you want to display. Click the Text Box tool in the toolbox, and then click in the report header.
- To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
- Set the ControlSource property to the parameter(s) you specified in the Criteria cell in the query; type each parameter exactly as it appears in the query, and be sure to include the square brackets.
- To see the criteria, print or preview the report. Access displays a dialog box asking for the parameter value, and then displays the parameter value you entered in the report header.