Setting the Primary Key

Every table must have at least one field that has a unique value for each record. For instance, in a table of the dogs your kennel owns, you might assign an ID number to each dog, and have an ID # field in your table. Or you might choose to use each dog's AKC (American Kennel Club) registration number. This unique identifier field is known as the Primary Key field.

You must tell Access which field you are going to use as the Primary Key, so it can prevent you from accidentally entering the same value for more than one record in that field. To set a primary key, follow these steps:

  1. In Table Design view, select the field that you want for the primary key.

  2. Select EditPrimary Key, or click the Primary Key button on the toolbar. A key symbol appears to the left of the field name, as shown in Figure 8.4.

    Figure 8.4. The primary key field is marked by a key symbol.

Primary Key Field

The designated field for which every record must have a unique entry. This is usually an ID number, since most other fields could conceivably be the same for more than one record (for instance, two people might have the same first name).


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.253.152