Microsoft KB Archive/302673

= ACC2002: No Primary Key on a Copied or an Imported Table in an Access Project =

Article ID: 302673

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q302673



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
In a Microsoft Access project (ADP), when you copy and paste or import a table that contains a primary key, no primary key is created on the resulting table. Therefore, the table is not updateable.



RESOLUTION
To work around this behavior, use one of the following methods.

Method 1
Manually re-create the primary key on the copied or imported table as follows:
 * 1) Open the table in which you want to create a primary key in Design view.
 * 2) Select the field on which you want to create the primary key.
 * 3) On the Edit menu, click Primary Key. After a moment, a key icon appears next to the row that you selected.
 * 4) On the File menu, click Save to save your changes.

Method 2
If your field names do not contain spaces, install the Microsoft SQL Server 2000 Desktop Engine (formerly MSDE, or Microsoft Data Engine) or SQL Server 2000 locally prior to copying the table.

If your field names contain spaces, please review the following article in the Microsoft Knowledge Base:

287446 ACC2002: Error Message: Start Position Is Before the Beginning or Past the End of the Rowset. No Rows Were Returned

For additional information about how to install Microsoft SQL Server 2000 Desktop Engine, click the article number below to view the article in the Microsoft Knowledge Base:

290627 ACC2002: Microsoft SQL Server 2000 Desktop Engine Is Not Installed by Office XP Setup



Steps to Reproduce the Behavior

 * 1) Start Microsoft Access on a computer that does not have SQL Server or SQL Server 2000 Desktop Engine installed.
 * 2) On the Help menu, point to Sample Databases, and then click Northwind Sample Access Project.
 * 3) In the Database window, click Tables under Objects, and then click Employees.
 * 4) On the Edit menu, click Copy.
 * 5) On the Edit menu, click Paste.
 * 6) In the Table Name box, type Employees2 . Under Paste Options, click Structure and Data, and then click OK.
 * 7) Open the Employees table in Design view, and note the primary key on the EmployeeID column.
 * 8) Open the Employees2 table in Design view and note there is no primary key on the EmployeeID column.

Additional query words: prb recordset updateable

Keywords: kbprb KB302673

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.