Jim Dettman
jimdettman at verizon.net
Fri Sep 14 10:01:29 CDT 2012
<<Is the SQL in a query somehow changed when a report is opened?>> Yes. Check the sorting and grouping options in the report. Also, the filter by and order on if your using them. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, September 14, 2012 09:48 AM To: Access Developers discussion and problem solving Subject: [AccessD] Query Too Complex 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