ACC2: Error (-1310) Running Crosstab or Totalling QueryLast reviewed: November 25, 1997Article ID: Q119077 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you run a query that contains aggregate (totals) functions, you receive the error message:
Reserved error (-1310); there is no message for this error.This problem occurs only with queries for which all of the following conditions are true:
CAUSEThe error is caused by the query optimizer. Any changes made to the query or its underlying tables that cause Microsoft Access to change its query optimization strategy can either result in or resolve this error. Changes include adding criteria to the query, adding indexes to or removing them from underlying tables, adding rows to underlying tables, and then resaving the query, and so on.
RESOLUTION
Method 1The best way to prevent the error is to divide the query into two or more separate queries that produce the same result. For example, the following sample query will result in the error message stated above. It uses tables from the sample database NWIND.MDB and returns the average unit price for each customer and the quantity of items sold:
Tables: Customers, Orders, Order Details Group By: [Customers].[Company Name] Group By: [Order Details].[Quantity] Avg: [Order Details].[Unit Price]To prevent the error, divide the query into two queries by following these steps:
Method 2Adding criteria to the query can also prevent the error from occurring. Add criteria that do not affect the outcome of the query, such as comparing a field to itself. For example, you could use the following critera for a query that includes the Customers, Orders, and Order Details tables:
Customers.[Customer ID]=Customers.[Customer ID] STATUSMicrosoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0. This problem no longer occurs with the Microsoft Jet database engine version 2.5, which is available with the Microsoft Access version 2.0 Service Pack. For information about how to obtain the Service Pack, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q122927 TITLE : WX1124: Microsoft Access Version 2.0 Service Pack MORE INFORMATION
Steps to Reproduce Problem
|
Additional query words: queries querying jet25 jet 2.5
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |