Indexes improve performance when you’re
searching, sorting, or grouping on a field or fields. Primary key
indexes are used to maintain unique values for records. For example,
you can create a single-field index that does not allow a duplicate
order number or a multiple-field index that does not allow records with
the same first and last names.
Create an Index Based on a Single Field
To create an index based on a single field (from Design view), follow these steps:
1. | Select the field to be indexed.
|
2. | Click the Indexed row of the Field Properties pane.
|
3. | Select
the desired index type—No, Yes (Duplicates OK), or Yes (No Duplicates).
The Yes (Duplicates OK) option means that you are creating an index and
that you will allow duplicates within that field. The Yes (No
Duplicates) option means that you are creating an index and you will not
allow duplicate values within the index. If the index is based on
company name and you select Yes (Duplicates OK), you can enter two
companies with the same name. If you select Yes (No Duplicates), you
cannot enter two companies with the same name.
|
Create an Index Based on Multiple Fields
To create an index based on multiple fields (from Design view), follow these steps:
1. | Select Indexes from the Show/Hide group on the Design tab of the Ribbon. The Indexes window appears (see Figure 1).
|
2. | Type the index name in the Index Name column.
|
3. | From the Field Name column, select the desired fields to include in the index. |
4. | Select the desired index properties.
|
5. | Close the Indexes window if desired. |