ACC2: Union Query with Calculated Field May Cause GP Fault

Last reviewed: May 7, 1997
Article ID: Q119711
The information in this article applies to:
  • Microsoft Access versions 2.0

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
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.