[ Team LiB ] Previous Section Next Section

Setting a Primary Key Using the Table Wizard

When you create a table with the Table Wizard, you can choose either to set a primary key yourself or to have the wizard do it for you. If you set the primary key, a dialog box appears that allows you to select the primary key and define its data type. Access can generate primary key values automatically, or you can enter a unique value for each new record when you enter data.

Set the Primary Key Yourself

graphics/1_icon.jpg

When the Table Wizard prompts you to set the primary key, click the No, I'll Set The Primary Key option. Click Next to continue.

graphics/2_icon.jpg

Click the list arrow to select the field you want to use as the primary key.

graphics/3_icon.jpg

Click the option corresponding to the data type you want to use for your primary key.

graphics/4_icon.jpg

Click Next to continue.

graphics/5_icon.jpg

Click the option corresponding to what you want to do after the wizard creates the table.

graphics/6_icon.jpg

Click Finish.

graphics/03inf05.jpg

See Also

See "Specifying a Primary Key in Design View" on page 57 for information on creating and altering primary keys.


Primary Key Options

Option

Description

Consecutive Numbers

Access assigns the primary key value for a new record that is automatically one more than the primary key value in the previous record.

Numbers I Enter When I Add New Records

You enter a unique number for the primary key of each new record.

Numbers And/Or Letters I Enter When I Add New Records

You enter a unique string of text for the primary key of each new record.


    [ Team LiB ] Previous Section Next Section