Microsoft Office Tutorials and References
In Depth Information
Session 2.1
Specifying a Primary Key for a Table
Reference Window
In the Table window in Design view, click the row selector for the field you’ve chosen to
be the primary key.
If the primary key will consist of two or more fields, press and hold down the Ctrl key,
and then click the row selector for each additional primary key field.
Click the Primary Key button on the Table Design toolbar.
According to Elsa’s design, you need to specify PositionID as the primary key for the
Position table.
To specify PositionID as the primary key:
1. Position the pointer on the row selector for the PositionID field until the pointer changes to
a
shape. See Figure 2-14.
Specifying PositionID as the primary key
Figure 2-14
Primary Key
button
pointer
row selector
2. Click the mouse button. The entire first row of the Table Design grid is highlighted.
3. Click the Primary Key button on the Table Design toolbar, and then click a row other
than the first to deselect the first row. A key symbol appears in the row selector for the first
row, indicating that the PositionID field is the table’s primary key. See Figure 2-15.
PositionID selected as the primary key
Figure 2-15
key symbol indicates
the table’s primary key
If you specify the wrong field as the primary key, or if you later change your mind and do
not want the designated primary key field to be the table’s primary key, you can select the
field and then click the Primary Key button on the Table Design toolbar again, which will
remove the key symbol and the primary key designation from the field. Then you can
choose another field to be the primary key, if necessary.
 
Search JabSto ::




Custom Search