Specifying a Primary Key in Design View

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

graphics/1_icon.jpg

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.

graphics/2_icon.jpg

Click the row selector of that field.

graphics/3_icon.jpg

Click the Primary Key button on the Table Design toolbar.

graphics/03inf10.jpg

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.




Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

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