ACC2002: No Primary Key on a Copied or an Imported Table in an Access Project (302673)



The information in this article applies to:

  • Microsoft Access 2002

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

MORE INFORMATION

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.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:kbprb KB302673