Microsoft KB Archive/109351

{|
 * width="100%"|

PRA: Reserved Error -1051 Pasting Over Primary Key Field
'Article ID: Q109351

Creation Date: 02-JAN-1994

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0 and 1.1

SYMPTOMS

Microsoft Access allows you to paste a field over an existing primary key field in a table's Design view. However, when you try to save the changes to the table you will receive the error message:

Reserved error (-1051); there is no error for this message. CAUSE

Microsoft Access does not allow you to delete key fields from tables if they are referenced in a relationship with other tables. However, Microsoft Access does not check to see if a row can be deleted before pasting the new row into the table.

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

Steps to Reproduce Problem

NOTE: In some cases the following example will generate a reserved error (-1046). If you then close the table and choose No in the Save Changes To Table  box, the primary key WILL be gone when you next open the table. Microsoft Access will not let you re-create the primary key because the table is part of a relationship with at least one other table. You must delete all relationships with other tables before you can re-create the key.


 * 1) Start Microsoft Access and open the sample database NWIND.MDB.
 * 2) Open the Customers table in Design view.
 * 3) Select the Customer ID row.
 * 4) From the Edit menu, choose Copy. Then, choose Paste from the Edit menu.
 * 5) From the File menu, choose Save. Choose No in the Create A Primary Key? box.

The error message stated above will occur.
 * }

-

"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." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10

KBCategory: kbusage

KBSubcategory: TblModfy