ACC2000: No Primary Key on Copied or Imported Table in Access Project
ID: Q223216
|
The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
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.
RESOLUTION
You must re-create the primary key on the copied or imported table manually. To do so, follow these steps:
- Select the table in which you want to create a primary key and open it in Design view.
- Select the row that describes the field on which you want to create the primary key.
- On the Edit menu, click Primary Key. After a moment, a key icon should appear next to the row that you selected.
- On the File menu, click Save to save your changes.
MORE INFORMATIONSteps to Reproduce Behavior
- Open Microsoft Access.
- On the File menu, click Open.
- In the Open dialog box, select NorthwindCS.adp and click Open.
- In the Database window, click Tables under Objects, and then select Employees.
- On the Edit menu, click Copy.
- On the Edit menu, click Paste.
- In the Table Name box, type Employees2. Under Paste Options select Structure and Data, and then click OK.
- Open the Employees table in Design view and note the primary key on the EmployeeID column.
- Open the Employees2 table in Design view and note there is no primary key on the EmployeeID column.
REFERENCESFor 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.
Additional query words:
prb
Keywords : kbdta AccessCS
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
|