[AccessD] Query Too Complex

Charlotte Foust charlotte.foust at gmail.com
Fri Sep 14 09:41:48 CDT 2012


You get that message sometimes but it usually doesn't mean what it says.
It's an indication that there's something wrong in the query or in the
report.  I'd recommend saving the SQL to text, creating a new query and
trying that.  I firmly believe from my own experience that queries sometime
collect binary junk that causes them to malfunction.  If the query runs as
a query but not when you run the report, it may mean you're running into
internal overflows in some way.  Reports don't just run the queries they're
based on. Temporary copies of the queries are run on the wing and you get
layers of queries hogging the processor.  I've seen the error on a simple
select query based on a table where all the fields were set to the maximum
255 char size.

So the short answer is rebuild the query.

Charlotte Foust



On Fri, Sep 14, 2012 at 6:48 AM, Brad Marks <BradM at blackforestltd.com>wrote:

> All,
>
> I ran into something this week that I have never seen before.
>
> I have a small Access 2007 reporting application that is pulling data from
> a Firebird database via ODBC.
>
> One of the reports in the Access application has a Union query as its data
> source.
>
> I have run multiple tests with the query it it works nicely.
>
> I ran multiple tests of the report and it worked nicely at first.  In
> reviewing the report with one of our users, it was suggested that there was
> a field on the report that was not needed.
>
> When I simply removed this one field from the report, I started receiving
> a "Query Too Complex" error.
>
> If I put the field back in the report, the error goes away.  When I remove
> the field, the "Query Too Complex" error surfaces again.
>
> I am very puzzled by this.  I can open the query by itself and it works
> fine.  When I try to open the report (when the field in question is
> removed), I receive the error.
>
> I don't understand what happens behind the scenes when a report is opened.
>  Is the SQL in a query somehow changed when a report is opened?
>
> I have now included the field on the report as "not visible" as a "work
> around", but I would really like to understand what is causing this strange
> situation.
>
> Thanks,
> Brad
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>
>


More information about the AccessD mailing list