How to Set or Change the Primary Key in an Access 2003 Database
The Access application uses the primary key to identify each item in a database table. When you set or change the key, you modify the ID number that the program uses to match records from one table to another. Here's how to set or change the key.
Instructions
-
-
1
Open the Microsoft Access 2003 program. Press and hold down the "Ctrl" button and "F1" to open the "Task Pane." Find the name of the database that you want to alter and click to open.
-
2
Clear the "Main Switchboard" window by pressing the "Display Database Window" button. This displays information about the database in a new window. Expand the "Options," located on the left side of the database window, and click "Tables."
-
-
3
Find the table to which you will be making primary key changes, and left-click once on the table to select it. Click "Design" (located in the database window toolbar) to bring up the design view of the table.
-
4
Right-click on the field name that you want to set as the primary key for the table. This brings up a menu of options, and the topmost option is "Primary Key." Left-click on this to make the selected field name the new primary key.
-
1
Tips & Warnings
If you want to choose more than one field to be the primary key for the table, look for the small box (called the "row selector") on the left side of each row of the table. Press and hold the "Ctrl" button while clicking the row selector of each row you want to use as a primary key.
Look for the key icon in the row selector to find the current primary key for a table in an Access 2003 database.
Not all field names can be used as the primary key for the table. The Access 2003 application will display warnings if you attempt to use invalid choices for the primary key.