Set or change the primary key (MDB)

Microsoft Office Access 2003

Show All Show All

Set or change the primary key (MDB)

Note  The information in this topic applies only to a Microsoft Access database (.mdb).

  1. Open a table in Design view.
  2. Select the field or fields you want to define as the primary key.

    To select one field, click the row selector for the desired field.

    To select multiple fields, hold down the CTRL key and then click the row selector for each field.

  3. Click Primary Key Button image on the toolbar.

Note  If you want the order of the fields in a multiple-field primary key to be different from the order of those fields in the table, click Indexes Button image on the toolbar to display the Indexes window, and then reorder the field names for the index named PrimaryKey.