Why does Access want me to enter a parameter value?

Symptoms

When you open a Microsoft Office Access object (such as a table, query, form, or report), Access displays the Enter Parameter Value dialog box.

Cause

Access displays the Enter Parameter Value dialog box when you open an object that contains an identifier (identifier (expressions): An element of an expression that refers to the value of a field, control, or property. For example, Forms![Orders]![OrderID] is an identifier that refers to the value in the OrderID control on the Orders form.) or expression (expression: Any combination of mathematical or logical operators, constants, functions, and names of fields, controls, and properties that evaluates to a single value. Expressions can perform calculations, manipulate characters, or test data.) that Access cannot interpret. In some cases, this is the behavior that you want. For example, the creator of the database might have created a query that lets you enter information every time that the query runs, such as a start date or an employee ID number. Such a prompt might resemble this:

Enter Parameter Value dialog box

However, in other cases you do not want this dialog box to appear. For example, you might have made some changes to the design of your database, and now when you open an object, Access displays the dialog box unexpectedly with a message you do not understand.

Enter Parameter Value dialog box

Resolution

To stop the Enter Parameter Value dialog box from appearing, you must inspect any expressions that are associated with the object that you are working with, and find the identifier that is causing the dialog box to appear. Then, you must correct the identifier or the syntax of the expression that contains the identifier. The following procedures provide general guidelines for inspecting the expressions in different types of objects. However, the specific changes that you must make depend on the structure of your database.

Find links to more information about expression syntax in the See Also section.

  1. When the unwanted Enter Parameter Value dialog box appears, note the identifier or expression that is listed in the dialog box:

Enter Parameter Value dialog box

  1. Click Cancel.
  2. Continue with one of the following procedures, depending on the type of object that you are opening when the dialog box appears.


Inspect expressions in a query

Typographical errors in queries are a frequent cause of unwanted parameter prompts. As mentioned earlier, when a query is designed to ask for a parameter value when it is run, the Enter Parameter Value dialog box appears by design. However, if you are sure that the query should not be asking for a parameter value, use this procedure to inspect the query for incorrect expressions.

  1. Right-click the query in the Navigation Pane, and then click Design View.
  2. Inspect the identifiers and expressions in the Field row and in the Criteria rows, and determine whether any of the text matches the text that was displayed in the Enter Parameter Value dialog box. In particular, if one of the cells in the Field row contains a value such as Expr1: [identifier], this might be the source of the parameter prompt.

Query that contains an expression that causes the Enter Parameter Value dialog box to appear

Find links to more information about how to create parameter queries in the See Also section.

Top of Section

Inspect expressions in a report

If the Enter Parameter Value dialog box appears when you open a report, follow these steps to inspect the report's properties:

  1. Right-click the report in the Navigation Pane, and then click Design View.

 Note   Before continuing, determine if any of the controls on the report display a green triangle in their upper-left corner. The triangle is an indication that Access cannot evaluate an identifier or expression in the Control Source property of that control. If any controls display the green triangle, pay particular attention to those controls when performing the steps that follow.

Report containing a text box with a misspelled identifier

  1. If the Property Sheet task pane is not displayed, press F4 to display it.
  1. In the Property Sheet task pane, click the All tab.
  2. Click a control that displays data on the report (such as a text box, check box, or combo box). If any controls display the green triangle mentioned previously, click one of those first.
  3. In the Property Sheet task pane, inspect the Control Source property for the identifier that was displayed in the Enter Parameter Value dialog box, and then modify the expression if necessary.
  4. Repeat the previous two steps for other controls on the report, until you find the expression that is causing the problem.
  5. If you still cannot find the problem, check for any incorrect expressions in the Group, Sort, and Total pane:
    • If the Group, Sort, and Total pane is not displayed, on the Design tab, in the Grouping & Totals group, click Group & Sort.
    • If "Group by expression" or "Sort by expression" is displayed on a line in the Group, Sort, and Total pane, click the word "expression" to open the Expression Builder, where you can examine the expression and modify it if necessary.

Top of Section

Inspect expressions in a form

If the Enter Parameter Value dialog box appears every time that you open a form, the incorrect expression might be in one of the following places:

Inspect the underlying query

If the record source for the form is a query, examine the underlying query to find the incorrect expression.

  1. Right-click the form in the Navigation Pane, and then click Design View.
  2. If the Property Sheet task pane is not displayed, press F4 to display it.
  1. Make sure that Form is selected in the list at the top of the Property Sheet task pane, and then click the All tab.
  2. Examine the Record Source property. If it contains the name of a query, or an SQL statement (SQL string/statement: An expression that defines an SQL command, such as SELECT, UPDATE, or DELETE, and includes clauses such as WHERE and ORDER BY. SQL strings/statements are typically used in queries and in aggregate functions.), then one of the identifiers in the statement may be incorrect, and causing the Enter Parameter Value dialog box to appear. Click the Record Source property box, and then click the Build button Button image.
  3. Use the procedure in the section Inspect expressions in a query to find the incorrect expression.

 Important   To save your changes to the query when you are finished, close the query, and then save the form before switching back to form view. Otherwise, any changes that you made to the query will be lost.

Inspect a combo box or list box on the form

An incorrect expression in the Row Source property of a combo box or list box control can cause the Enter Parameter Value dialog box to appear. In some cases, the dialog box does not appear until you try to use the control. Use this procedure to inspect the Row Source property of the control:

  1. Right-click the form in the Navigation Pane, and then click Design View.
  2. Click the combo box or list box that you want to inspect.
  3. If the Property Sheet task pane is not displayed, press F4 to display it.
  1. Click the Data tab, and then examine the Row Source property and determine whether any of the text matches the text in the Enter Parameter Value dialog box.

Top of Section

Inspect expressions in a table

If Access displays the Enter Parameter Value dialog box every time that you open a table, the incorrect expression is most likely in the Row Source property of a Lookup field in that table.

  1. Right-click the table in the Navigation Pane, and then click Design View.
  2. To determine if a field is a Lookup field, click the field name, and then under Field Properties, click the Lookup tab. If the tab contains a Row Source property box, then the field is a Lookup field. Examine the Row Source property. If it contains an SQL statement (SQL string/statement: An expression that defines an SQL command, such as SELECT, UPDATE, or DELETE, and includes clauses such as WHERE and ORDER BY. SQL strings/statements are typically used in queries and in aggregate functions.), then one of the identifiers in the statement may be incorrect, and causing the Enter Parameter Value dialog box to appear.

 Note   A table can have multiple Lookup fields, so be sure to check the Lookup tab for each field.

Top of Section

Top of Page Top of Page

 
 
Applies to:
Access 2010, Access 2007