Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Display a criteria parameter in an Access report
 
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

  1. 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.

  2. Open the report in Design view.
  3. 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.
  4. To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
  5. 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.
  6. 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.
© 2009 Microsoft Corporation. All rights reserved.