How to Set or Change the Primary Key in a Microsoft Access Database

Next Video:
How to Filter Records in a Microsoft Access Table....5

Before setting or changing the primary key in a Microsoft Access database, it's important to understand that Microsoft Access is going to automatically create a primary key when a table is being designed. Create a zip code field in Microsoft Access with help from a computer programming teacher in this free video on Microsoft Access.

Part of the Video Series: Microsoft Access Tutorial
Promoted By Zergnet


Video Transcript

Hi. My name is Chip Browne. I teach computer programming and Microsoft Office Applications at Steven Henager College here in Utah. I also create practice tests for Microsoft Office Applications Certification Tests. Today we're going to learn how to set or change the primary key in a table using Microsoft Access 2007. Microsoft Access is a registered trademark of Microsoft Corporation. I'm not affiliated with Microsoft Corporation. To learn how to set or change a primary key with Microsoft Access it's important to understand that Microsoft Access is going to automatically create a primary key when you are designing a table. For example, let's create a table. Click on the create tab; the table command and then click on the views. Go into design view. Save the table and you'll see here that the first table is being created with a primary key field. This field here is the primary key field as designated by this key icon. The data type here is the auto number, dated type which means that Access will be responsible for automatically putting a number in this field, a sequential number beginning at one. It will automatically populate that field making it a unique field and perfect for being a primary key. If however we are interested in creating a different primary key, let's say a zip code field, would be a unique field for primary key. You can create the field and then right click on that field and select primary key in the drop down short cut menu. As you can see the primary key has now changed to zip code. In the tools group here you'll also notice that the primary key button has been selected. No longer is this original field selected. So, we would click on that, do a right click and delete that row. Then we would continue on with the creation of our fields in our table. This is how you can create and change a primary key in Microsoft Access. For more information visit me, Chip Browne, at That's Browne with an "e."


Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!