Faculty/Staff Help Student Help About Computer Services    
   

Access Tip -  Primary keys

 

The power of a relational database system such as Microsoft Access comes from its ability to quickly find and bring together information stored in separate tables using queries, forms, and reports. In order to do this, each table should include a field or set of fields that uniquely identifies each record stored in the table. This information is called the primary key of the table. Once you designate a primary key for a table, Access will prevent any duplicate or null values from being entered in the primary key fields.

There are 3 kinds of primary keys that can be defined in Microsoft Access:

  • Autonumber primary keys

  • Single field primary keys

  • Multiple field primary keys

 An AutoNumber field can be set to automatically enter a sequential number as each record is added to the table. Designating such a field as the primary key for a table is the simplest way to create a primary key. If you don't set a primary key before saving a newly created table, Microsoft Access will ask if you want it to create a primary key for you. If you answer Yes, Microsoft Access will create an AutoNumber primary key

 

 

 

 
Ouachita Baptist University • Computer Services
Cone Bottoms Hall 250 • 870.245.5567

online support form support@obu.edu www.obu.edu