"Query is too complex" message

  • Thread starter Thread starter PF
  • Start date Start date
P

PF

Hi all,

I get the message "Query is too complex" when I open a
report (ans it fails), but when I open the underlaying
query I have no problems at all.

What may be the problem, and there is any way of fixing it?

I have tried a lot of ways, but to no avail.

Thanks in advance,

PF
 
There are several possible causes for this message.

If the query is indeed complex, and the report attempts to perform further
sorting and grouping, then the message may mean just what it says. You may
be able to work around the issue by stacking one query on another (using one
query as an input "table" for another one, which is then less complex).

However, the message can also mean simply that Access can't make sense of
part of the query. For example, it may not have understood the data type
that you intended. If the query has parameters, declare them: Parameters on
the Query menu, in query design view. That includes any reference to
controls on a form. For example, if you have an unbound text box named
"StartDate" on "Form1" where the user enters a date, declare this parameter
in your query:
[Forms].[Form1].[StartDate] Date/Time
For unbound text boxes, you can also help Access understand the data type by
setting the Format property to Short Date, General Number, etc.

The problem could also be in a less obvious place in the report. For
example, you may see the message if you refer to a field in the
Sorting'n'Grouping dialog, or in Filter or OrderBy properties of the report,
and that field no longer matches the name or expected data type of the field
in the query.

In Access 2000 and later, the issue can be complicated further if you have
not yet turned off the Name AutoCorrect text boxes under Tools | Options |
General. Access will try to keep track of any changes to the field names,
and may therefore misunderstand the fields and consider the query to be too
complex. There are a raft of problems with this mis-feature anyway, so you
are better off without it. Details in article:
Failures caused by Name Auto-Correct
at:
http://allenbrowne.com/bug-03.html
 
Back
Top