Indexing a Field


graphics/04inf14.jpg

graphics/one_icon.jpg

After you've opened the table you want to change in Design view, click in the field you want to index (in this example, the Product Number field).

graphics/two_icon.jpg

In the property sheet, click in the Indexed field. A down arrow appears to the right of the field.

graphics/three_icon.jpg

Click the down arrow and, in the list that appears, choose Yes (Duplicates OK) or No (No Duplicates) depending on your needs.

graphics/four_icon.jpg

This field now will be indexed and may require a unique entry, depending on your selection. Click the Save button on the Standard toolbar to save changes to the table.

INTRODUCTION

In addition to using the primary key, you can create indexed fields to speed sorting and searches. Because indexing fields slows down updates, however, you should do so only on fields on which you often search or sort . When you specify that a field be indexed, you can also specify that the field contain a unique entry (that is, no duplicates). This is helpful for fields containing values that should be unique, such as a field containing a product ID. It wouldn't be necessary, however, for a field that contains last names because numerous people referenced in a database could have the same last name .

TIP

Entering Duplicate Values by Mistake

If you try to create a new record with a duplicate entry in an indexed field that doesn't accept duplicate values, you'll see an error message. Click OK and change the value in the indexed field to a unique entry.



Easy Microsoft Office Access 2003
Easy Microsoft Office Access 2003
ISBN: 789729598
EAN: N/A
Year: 2003
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net