To create an index or a primary key for a field in a database table, you first need to choose a type for the field in the Type box (see Field data types). At this stage, you may be designing a new table or editing/formatting an existing table design (see Creating fields in a database).
Once you have set the type for the field, click on the Format button in the dialog (either "New Table" or "Format Table").
In the "Format Field" dialog, click in the Value box to the right of Index. Click on the arrow to display all of the Index formatting options. The full set comprises:
No Index (no index applied to this field)
Primary Key (primary key applied to this field) See Primary key
Indexed (a non-unique index applied to this field) See Non-unique indexes
Indexed (Unique) (a unique index applied to this field) See Unique indexes
Click on one of these to select it. Note that only one field can be formatted as a Primary Key field. If you afterwards choose another field as the Primary Key, the first field will automatically become Indexed (Unique) instead.
Not all of the available data types can be index formatted. Obviously it makes no sense to index Memo or OLE fields, therefore no indexing options are provided for these. Moreover, though you could set a Primary Key for a Logical field, this would only make sense if you intended your table to contain a maximum of two records. The Incremental data type, if it is set for a field, is automatically the best choice to made the Primary Key.
Here is a list of index options and the data types that can be used with them:
Primary Key |
Indexed |
Indexed (Unique) |
Character |
Character |
Character |
You can check which fields have indexes set for them at any time. In addition, you can create multiple-field indexes.
See: