ACC2000: "The CALC Expression (Expression) Is Invalid" Error Switching to Page View (202222)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q202222
Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

When you type an expression in the ControlSource property on a data access page and then switch to Page view, you may receive the following error message:
The CALC expression (expression) is invalid.
After you click OK to close the error message, you see the page in Page view, but all the fields contain #Name?.

CAUSE

You will see this behavior if a control on the page contains an invalid expression.

RESOLUTION

Change the ControlSource property to a valid expression.

MORE INFORMATION

Steps to Reproduce Behavior

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

  1. Open the sample database Northwind.mdb.
  2. In the Database window, click Pages under Objects, and then click New.
  3. In the New Data Access Page dialog box, click Page Wizard. Click OK.
  4. In the Tables/Queries list, click Tables: Employees. Move EmployeeID, LastName, and FirstName from the Available Fields list to the Selected Fields list, and then click Finish.
  5. Add a text box to the page.
  6. If the Properties window is not open, on the View menu, click Properties. Click the Data tab.
  7. In the ControlSource property, type =LastName.Value & FirstName.Value.
  8. On the View menu, click Page View. Click OK to the error message. Note that all fields on the page contain #Name?.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbDAP kbprb KB202222