Article ID: 248271
Article Last Modified on 6/24/2004
APPLIES TO
- Microsoft Access 2000 Standard Edition
This article was previously published under Q248271
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS
When you run certain queries, such as a union query, you may receive the following error message:
RESOLUTION
Install the latest Microsoft Jet 4.0 service pack. For additional information about installing the latest version of the Jet Update, click the following article number to view the article in the Microsoft Knowledge Base:
239114 How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
There are several possible causes for this error. One example is a union query that has more than 22 Select statements. The following steps illustrate this problem.
Steps to Reproduce the Behavior
- Open the sample database, Northwind.mdb.
Create the following union query that contains 22 Select statements:
SELECT EmployeeID FROM Employees UNION ALL SELECT LastName FROM Employees UNION ALL SELECT FirstName FROM Employees UNION ALL SELECT Title FROM Employees UNION ALL SELECT TitleOfCourtesy FROM Employees UNION ALL SELECT BirthDate FROM Employees UNION ALL SELECT HireDate FROM Employees UNION ALL SELECT Address FROM Employees UNION ALL SELECT City FROM Employees UNION ALL SELECT Region FROM Employees UNION ALL SELECT PostalCode FROM Employees UNION ALL SELECT Country FROM Employees UNION ALL SELECT HomePhone FROM Employees UNION ALL SELECT Extension FROM Employees UNION ALL SELECT Photo FROM Employees UNION ALL SELECT Notes FROM Employees UNION ALL SELECT ReportsTo FROM Employees UNION ALL SELECT EmployeeID FROM Employees UNION ALL SELECT LastName FROM Employees UNION ALL SELECT FirstName FROM Employees UNION ALL SELECT Title FROM Employees UNION ALL SELECT TitleOfCourtesy FROM Employees;
- Save and run this query. Note that the query runs without error.
In Design view of this query, remove the semicolon from the end of the statement, and then append the following to the end of the statement:
UNION ALL SELECT BirthDate FROM Employees;
- The union query now contains 23 Select statements. Save and run the query. Note that you receive the error message mentioned in the "Symptoms" section of this article.
Additional query words: pra
Keywords: kberrmsg kbbug KB248271