Getting to Know Access 2003, Part 3 - The Primary Key
(Page 4 of 5 )
Set a field as the primary key by selecting the field, or fields, and clicking the Primary Key button in the toolbar. You should have a primary key in every one of your tables. This is important because a primary key ensures that each row of data is unique. This ensures that your tables do not contain replication errors, for instance. Generally you’ll want to use the AutoNumber data type for your primary key fields but you don’t have to.
Indexes
An index basically helps you find and sort records quicker. Primary keys are always indexed, but other fields are not. Choose fields you will search among frequently for particular values and index them by changing the index property of the field to Yes. You will also have to decide whether to permit duplicate values or not.
Changing the Design
At some point you’ll probably need to change your table design somewhat, even if you designed it properly in the first place. It’s a good idea to make a backup of your database before you make changes to the design. Even so, Access prompts you when you make changes if the changes are likely to result in data loss.
Some of the design elements you can change include adding or deleting fields, field order, field name and type, or field size. To change the primary key just select the row you want to be the new primary key and click the Primary Key button.
Table Properties
You can set two types of table properties in Access: table object and table definition properties. Object properties include such things as owner and date of creation. Table definition properties are those that relate to the structure of the table itself. To change the default table properties choose Tables | Options and then click the Tables/Queries tab and make the appropriate changes.
Next: Relationships >>
More Microsoft Access Articles
More By Sage Adams