Error running query for report...but query works fine when opened separately

J

John

We have a legacy access application with a parameterized query, its single
parameter being a date. The query runs without problem. A report, based on
this query, receives the following error message:

"This expression is typed incorrectly, or it is too complex 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."

The query is a relatively simple one, joining about 18 columns from three
tables. The report is extremely simple...in essence just adding page headers
and footers to the query. A search of the KB has yielded KB103429 (ACC: "Out
of Memory" or "Query Too Complex" with Query/Report) which is not exactly
the issue, but I will be looking at reducing the physical size of the query
with aliases (long names and lots of them). I have also discovered that this
is error 3701, but that does not tell me anything either.

Any help or suggestions would be most appreciated.

Thanks,
John
 
A

Allen Browne

There is something in the query statement that Access cannot understand.
That can happen if the field names can't be matched (e.g. the name starts
with a number but is not enclosed in square brackets), or the data types do
not match (trying to apply a numeric field on a string type), badly named
fields (such as a field called Where or Name), as well as less obvious
errors in the sql statement.

Is the parameter declared? In query design view, Parameters is on the Query
menu. Declaring it by name lets you specify the data type, and may help
Access understand what you intend.

Does the query contain a GROUP BY clause or DISTINCT predicate that causes
aggregation? Calculated fields that could be misinterpreted as per:
http://allenbrowne.com/ser-45.html

What version of Access is this mdb?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top