ACC: "Out of Memory" or "Query Too Complex" with Query/Report

ID: Q103429


The information in this article applies to:


SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you run a query, a form, or a report based on a query, you may receive an "Out of Memory" or "Query too Complex" error message.


CAUSE

In Microsoft Access 1.x and 2.0, queries must compile within a 64 kilobyte (K) segment. If you generate a query that is greater than 64K, you may see either the "Query too Complex," or the "Out of Memory" error message. In Microsoft Access 7.0 and 97, the 64K limit is replaced by a dynamic limit which offers much more room; however, it is still possible to make a query too complex.

Reports create temporary queries for each section of the report, including the report header, page header, group header, detail section, group footer, page footer, and report footer. All of the temporary queries for each report are combined into a segmented virtual table (SVT). The final output must be compiled within the 64K segment limit.

Similar 64K limits are used to compile and store all of the expressions from page to page when the report is being processed or to store the unbound controls or label information. If any of these segments exceed the limit, controls on the report may start displaying the "#Name?" error message.


RESOLUTION

These error messages are related to the complexity of the underlying query or the report itself. To reduce the complexity of your queries or report, try the following suggestions:


Keywords          : kberrmsg kbusage RptOthr 
Version           : 1.0 1.1 2.0 7.0 97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: March 26, 1999