Composite primary key

  • Thread starter Thread starter Guest
  • Start date Start date
In the Table DesignView. click the rectangle Left of the first required
Field name. This will select the first Field (row). Hold the Control Key
down when you do the same for the second Field. You can select up to 10
Fields.

Once you select all required Fields, click the Key icon in the Toolbar.

If you want to select a contiguous block of Fields, you can use Shift
instead of Control.
 
In design view control-click on the fields you want to be in the Primary Key.
Now click on Edit: Primary Key in the menubar.

Alternatively,

To create a multiple field unique index
--Open up the WorkingTable in design mode
--Select View: Index from the menu
--Enter a Name for Index in first blank cell under Index Name
--Select one field in the index under Field Name
--For Primary key, click on the Primary checkbox.
--Set Unique to Yes
--Move down one line and select the next FieldName
--Continue moving down and selecting fieldnames until all needed are included.
--Close the index window and close and save the table
 
Back
Top