|
|
There are three types of primary keys. You can define a primary key by one or more fields. In addition to single-field and multi-field primary keys, you also can define AutoNumber primary keys. An AutoNumber field automatically enters a sequential number whenever someone adds a new record to a table. Or you can create single- and multi-field primary keys. For a single-field primary key, open the table in Design View. Click the row selector for the field that you want to serve as a primary key. The row selector is the small button to the left of the row. Next, click the Primary Key button on the toolbar. Create a multi-field primary key like a multi-field index, but select Yes For Primary in the lower portion of the Indexes dialog. The last one is to create an AutoNumber primary key. Enter the table in Design View. After inserting a row and naming the new field, select AutoNumber in the Data Type column. Save the table to add your AutoNumber primary key to the table.
|