A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2004, 08:31 PM
John
external usenet poster
 
Posts: n/a
Default Error running query for report...but query works fine when opened separately

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


  #2  
Old May 21st, 2004, 04:15 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default Error running query for report...but query works fine when opened separately

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?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John" wrote in message
...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.