ACC1x: Incorrect Action Query Message Box Text

Last reviewed: May 14, 1997
Article ID: Q94598
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1

SYMPTOMS

An error message generated by an action query (that is, a delete, make-table, update, or append query) may contain the following incorrect message box text:

   Errors were encountered: The contents of fields in <number>
   record(s) were deleted, <number> record(s) were lost due to
   key violations and <number> record(s) were locked and couldn't
   be modified. Proceed anyway?

CAUSE

This problem is caused by the way Microsoft Access handles errors for action queries. Microsoft Access uses the same error message for every action query instead of using a separate error message for each type of action query.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION

The portion of the above error message that reports key violations:

   <number> record(s) were lost due to key violations

becomes active whenever referential integrity is violated during a query. However, this specific information only applies to Append and Make Table queries. If an update or delete query violates referential integrity, this portion of the error message erroneously gives the impression that records have been lost, when in fact they simply were not updated or deleted.

Steps to Reproduce Problem

  1. Create the following two tables:

          Table: Table1
          ---------------------------
          FieldName: ID  [PrimaryKey]
    
             DataType: Text
          FieldName: Name
             DataType: Text
    
          Table: Table2
          -----------------
          FieldName: ID
             DataType: Text
          FieldName: Hobby
             DataType: Text
    
    

  2. Create a one-to-many relationship between Table1 and Table2, with ID as the matching field. Enforce referential integrity rules.

  3. Add two records to each table.

  4. Create the following query based on Table1:

          Query: Query1
          -------------
          Field: ID
          Field: Name
    

  5. Change Query1 from a select query to a delete query by choosing Delete from the Query menu.

  6. Run Query1 by choosing Run from the Query menu.

  7. Choose the OK button to delete the records.

The following error message is displayed:

   Errors were encountered: The contents of fields in 0 record(s) were
   deleted, 2 record(s) were lost due to key violations and 0 record(s)
   were locked and couldn't be modified. Proceed anyway?

This message correctly identifies that there were key violations (because of referential integrity), but it incorrectly indicates the loss of two records. In actuality, the records were not modified and therefore not lost.


Keywords : kberrmsg kbusage QryMktbl
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
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 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.