Show Me Microsoft Office Access 2003

In Design view, you can use the Primary Key button to assign or remove the primary key designation for the selected field or fields. When you create a table in Design view, you can specify more than one field as a primary key. However, since you are not using the Table Wizard, you are responsible for determining the data type of the primary key. Whatever data type you choose, values for the primary key must be unique for each table record.

Specify a Primary Key

In Design view, create a field that will be that table's primary key, and then select an appropriate data type.

  • If you choose the AutoNumber data type, Access assigns a value to the primary key for a new record that is one more than the primary key in the previous record.

  • If you choose any other data type, such as Text, Number, or Date/Time, during data entry, you must enter a unique value in the appropriate format for the primary key of each new record.

Click the row selector of that field.

Click the Primary Key button on the Table Design toolbar.

Did You Know?

You can select more than one primary key . To create more than one primary key, press and hold Ctrl, click the row selector for each field you want to designate as a primary key, and then click the Primary Key button.

Категории