Microsoft Office Tutorials and References
In Depth Information
To Change the Primary Key
To change the primary key, you must fi rst delete the ID fi eld that Access created automatically. You then can
designate the Client Number fi eld as the primary key. To delete the ID fi eld, the table must appear in Design view
rather than Datasheet view. You also can designate the Client Number fi eld as the primary key within Design view.
As you defi ne or modify the fi elds, the row selector , the small box or bar that, when you click it, selects the entire
row, indicates the fi eld you currently are describing. The following steps move to Design view and then change the
primary key.
1
Click the Design View
button on the status
bar to move
to Design view.
Confi rm that your
data types match
those shown in the
fi gure. Make any
necessary corrections
to the data types
(Figure 1–35).
Design view
key symbol
indicates ID
fi eld is the
primary key
fi eld properties
(characteristics of
fi elds that can be
changed)
fi eld names
data types
Did I have to save the
table before moving
to Design view?
Yes. If you had not
saved it yourself,
Access would have
asked you to save it.
Design View
button
Figure 1–35
2
Click the row selector for the ID
fi eld to select the fi eld.
Design tab
Press the DELETE key to delete the
fi eld (Figure 1–36).
What if I click the row selector for
the wrong fi eld before pressing the
DELETE key?
Click the No button in the Microsoft
Offi ce Access dialog box. If you
inadvertently clicked the Yes button,
you have deleted the wrong fi eld.
You can fi x this by clicking the Close
button for the Client table, and then
clicking the No button when asked if
you want to save your changes.
ID fi eld selected
row selector
for ID fi eld
message indicates that
Microsoft Offi ce Access
will need to delete the
primary key
Microsoft Offi ce
Access dialog box
No button abandons
the operation without
deleting the fi eld
question asks if you
wish to delete the fi eld,
knowing that it will
involve deletion of the
primary key
Yes button
deletes the fi eld
Figure 1–36
Search JabSto ::




Custom Search