Knowledge Base |

# ACC2: Union Query with Calculated Field May Cause GP Fault

Article ID: 119711

Article Last Modified on 6/25/2002

APPLIES TO

- Microsoft Access 2.0 Standard Edition

This article was previously published under Q119711
Novice: Requires knowledge of the user interface on single-user computers.

## SYMPTOMS

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 kbprb kbusage KB119711