Share via

Expression too complex to be evaluated

Anonymous
2012-05-08T15:50:09+00:00

I have created a report to print invoices for multiple people.  In the query that the report pulls data from, I have entered [Enter Customer Name] in on of the criteria fields.  When I open the query and enter the name, it opens up just fine.  When I open up the report, with anything other than a one word Customer Name (even though the same customer name will open the query) I get the following error message:

"This expression is typed incorrectly, or it is too complicated to be evaluated. For example, a numeric expression may contain too many complicated elements.  Try simplifying the expression by assigning parts of the expression to variables."

My expression if two words, one five letters long the other eight letters - no special characters.

What have I done wrong.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-05-08T16:07:00+00:00

Open the query in design view.

On the Design tab of the ribbon, click Parameters.

Enter [Enter Customer Name] in the Parameter column exactly as used in the Criteria row.

Select Text in the Data Type column.

Click OK.

Save the query.

Does that make a difference?

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2012-05-09T03:15:41+00:00

    Is that the best idea, to have the user enter the customer name?

    Rather, create a Criteria form with a dropdown to select the customer from. It will have a hidden CustomerID column.

    Then change the report query to "look back" at your criteria form for the selected CustomerID:

    select * from someTable where CustomerID = Forms!myCriteriaForm!myCustomerDropdown

    Was this answer helpful?

    0 comments No comments