Creating Composite Keys Tutorial for MS Access

By Jim Campbell

Composite keys are table properties that use two columns as the primary keys. A primary key must be a unique value in the table. If there is no available column that is unique in the table, you have the option to create a composite key. A composite key uses the combined values to create a unique value in your table. Primary keys are a part of good table design, and they help with query performance. Composite keys are accomplished in the design view for Microsoft Access.

Step 1

Open your Microsoft Access database. Click the "Tables" menu item to list the tables programmed in the database. Right-click the table you want to edit and select "Design View."

Step 2

Hold the "Ctrl" key on your keyboard. Use the mouse to click both the columns you want to use for the composite key. This highlights both columns simultaneously.

Step 3

Click the "Primary Key" icon in the main menu. This icon is represented using a key image. Notice the left side of your table columns now display a key, which represents the primary key for a table. Since this is a composite key, both columns have a key.

Step 4

Click "Save" to save your table changes.

References & Resources