- Define indexes
- Set the properties of indexes
Imagine that you collect business cards in order to keep track of your professional contacts. Over time your collection of cards becomes quite large. You want to know which of your contacts work for Company Z, so you must read each and every card in order to develop your list. This could take quite a bit of time. But what if you had dog-eared the cards from Company Z beforehand? Would that have reduced the time it took you to find that select group of contacts?
Indexing a table enables Access to establish a sort order on the data in the indexed field. Without an index, Access would have to search each and every field—much in the same way you would have to look through each and every business card.
Indexes in Access have properties too.
- Primary. This property, when set to Yes, tells Access to use it as the table’s primary key.
- Unique. This property requires that the index is unique within the table.
- Ignore Nulls. If the index field of a record contains a null value, Access does not know how to handle the record. This property tells Access to ignore such records.