Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: No Primary Key on Copied or Imported Table in Access Project


View products that this article applies to.

This article was previously published under Q223216
Moderate: Requires basic macro, coding, and interoperability skills.

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

↑ Back to the top


Symptoms

When you copy and paste or import a table that contains a primary key to a Microsoft Access project, no primary key is created on the resulting table.

↑ Back to the top


Resolution

You must re-create the primary key on the copied or imported table manually. To do so, follow these steps:
  1. Select the table in which you want to create a primary key and open it in Design view.
  2. Select the row that describes 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 should appear next to the row that you selected.
  4. On the File menu, click Save to save your changes.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Open Microsoft Access.
  2. On the File menu, click Open.
  3. In the Open dialog box, select NorthwindCS.adp and click Open.
  4. In the Database window, click Tables under Objects, and then select Employees.
  5. On the Edit menu, click Copy.
  6. On the Edit menu, click Paste.
  7. In the Table Name box, type Employees2. Under Paste Options select Structure and Data, and then click OK.
  8. Open the Employees table in Design view and note the primary key on the EmployeeID column.
  9. Open the Employees2 table in Design view and note there is no primary key on the EmployeeID column.

↑ Back to the top


References

For more information about creating primary keys, click Microsoft Access Help on the Help menu, type defining a primary key in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB223216, kbclientserver, kbprb

↑ Back to the top

Article Info
Article ID : 223216
Revision : 2
Created on : 6/29/2004
Published on : 6/29/2004
Exists online : False
Views : 319