After you've created a table with the Table Wizard or from scratch, you might find that you want to fine-tune the table's structure. This requires that you edit your fields and their properties.
You can delete fields, add new fields, or change the order of fields in the table. You also can change a field's data type. Because the table's structure is discussed here and not the data, you need to work in the Table Design view.
You can open an existing table in the Table Design view in several ways:
Changing Field Names and Data Types
When you are in the Design view (see Figure 5.1), you can enhance or rework your table's structure. For example, you can change a field's name. Just double-click the field's current name and type in a new one.
Figure 5.1. A table's existing structure can be edited in the Design view.
You can also change the data type for an existing field. Click the field's Data Type box and select a new data type from the drop-down list. Remember that when you change a field name or a field's data type, you must save the changes that you've made to the table's structure.
Setting Field Properties
Field properties can also be edited for each field using the various Properties boxes found in the Field Properties pane on the lower half of the table's window in Design view. Lesson 4, "Creating a Table from Scratch," provides a quick overview of some of the properties that are available.
Another very useful field property, particularly for fields that use text entries (remember that text entries can include numbers ) is an input mask . An input mask is used to format data as you enter it into a field. For example, you might want to enter a date in a particular format, such as the format xx/xx/xxxx. The input mask can be used so that when you enter the data into the date field, all you need to enter is the two-digit input for the month and day, and four digits for the year. Access automatically places the slashes in the field for you.
Input masks are also very useful for entering ZIP codes. The input mask limits the number of characters that can be entered (such as those in a ZIP code), and if you use the 5-4 ZIP code format, the input mask can place the dash into the ZIP code for you.
To create an input mask for a field (such as a date field), follow these steps: