Setting up Tables and Fields

In Access database tables and database fields are integral elements to pulling together relevant information. Learn how to use them here.

Adding fields to a table

Access 2007 allows you to add fields to tables when you are:

Either way, you need to know how to switch between the two views.

To switch views:

Select the Views command group from either the Home tab (seen below) or the Datasheet tab on the Ribbon. Select the view option you want from the menu.

Switching ViewsSwitching Views

Adding fields in Datasheet view

By default, Access 2007 creates one field in each new table: the ID field. This field auto-numbers to give each record in the table a unique number identifier. Recall that records are the rows in a table.

TIP: You may want to rename the ID field with a unique name because the ID field appears automatically in every table you create. While this is not necessary, it may help avoid confusion when setting up table relationships.

ID FieldAutomatic ID Field

To add more fields to a table in Datasheet view, double-click the Add New Field header.

Add New FieldAdd New Field

The Add New Field text will disappear from the header. Name the field by typing the name directly into the header. Press the Tab key on your keyboard to move to the next field.

Adding fields in Design view

In Design view, the field names are along the lefthand column instead of across the top like in Datasheet view, as seen below.

Fields in Design ViewFields in Design View

To add a new field to a table in Design view, click in the cell where you want the new field and type the field name. When you switch back to Datasheet view, your new field appears as its own column, as seen below.

Datasheet View of added FieldDatasheet View of Added Field

In Design view, you have several field property options you can set to ensure data can only be entered in certain formats. Setting these options is a good idea if you want to make sure the data you have in your database is good, strong data.

Moving fields

If you want to rearrange the order in which your fields appear in a table, Access 2007 lets you easily move them around. To move a field in Datasheet view, drag and drop the field to the location you want. To do this:

Deleting fields

To delete a field in Datasheet view, click the field header, then select Delete from the Field & Column command group. This is found on the Datasheet tab on the Ribbon.

WARNING: You should not delete any field in a table without first knowing what impact the deletion may have on the rest of the database!