ACC2: Union Query with Calculated Field May Cause GP Fault

ID: Q119711


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you run a union query containing a calculated field in the first subquery, and an Order By clause containing the calculated field, you may receive a general protection (GP) fault error message.


RESOLUTION

Change the order of the subqueries in the union query, or remove the Order By clause from the query.


STATUS

This behavior no longer occurs in Microsoft Access version 7.0.


MORE INFORMATION

Steps to Reproduce Behavior

WARNING: Following the steps in this example will cause your computer to stop. Save and close any open files before following these steps.
  1. Open the sample database NWIND.MDB.


  2. Create a new, blank query.


  3. From the Query menu, choose SQL Specific then choose Union.


  4. Enter the following SQL statement in the Union Query window.

    NOTE: In the following SQL statement, neither the blank lines nor the line breaks affect the query. They are used here to improve readability.
    
          Select [First Name] & " " & [Last Name] as FullName
          From Employees
    
          Union Select [Contact Name] from Customers
          Order By FullName; 


  5. Save and then run the query. Note that you receive a GP fault.


Additional query words: all gpf


Keywords          : kberrmsg kbusage QryUnion 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 6, 1999