Access 2007
Setting up Tables and Fields
Adding fields to a table
Access 2007 allows you to add fields to tables when you are:
- Working in Datasheet View, which looks like a spreadsheet
- Working in Design View, where you are able to set more controls for your fields
Either way, you need to know how to switch between the two views.
Switching 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 would like from the menu.
Switching 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, since 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.
Automatic ID Field
To add more fields to a table in Datasheet View, double-click the Add New Field header.
Add 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 left-hand column instead of across the top like in Datasheet View, as seen below.
Fields in Design View
To add a new field to a table in Design View, just 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 Field
In Design View, you have many field property options you can set to ensure that 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:
- Click on the field header for the field you wish to move.
- Move the mouse in the area of the header.
- When the cross with arrows appears, hold down your left mouse button.
- With the left mouse button still held down, move the cursor to where you would like the field to appear.
- Release the mouse button, and the field appears in its new location.
Deleting fields
To delete a field in Datasheet View, just click on 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!