Lesson 4.11. Formatting Text Fields
Figure 4-14. The Format property
Just like number, currency, and date/time fields, a text field's Format property changes how information appears in the field. The Format property only changes how data is displayed on screen, not how the data is actually stored in the field.
Unfortunately, unlike number fields, text fields don't have any ready-made settings built into them and must be formatted manually. Luckily, text fields don't have nearly as many formatting options as number, currency, and date/time fields. The most common of these characters are the greater than symbol (>), which makes all text in the field appear in uppercase, and the less than symbol ( ), which makes all text in the field appear in lowercase, regardless of how it was entered. In both cases, Access actually stores the data exactly as it was typed.
This lesson will give you some practice formatting text fields.
If necessary, open the Lesson 4 database.
Now let's open the tblCustomers table.
Double-click the tblCustomers table.
First let's enter a sample record using your own personal information.
Click the New Record button on the Record Navigation bar, located at the bottom of the table window.
Access inserts a new blank record at the bottom of the table.
Press the Tab key and then enter your information into the new record. When you reach the State field, enter the state abbreviation in lowercase letters.
Move on to the next step when you have finished entering your record into the table.
Click the View button on the toolbar to display the table in Design view.
Access displays the tblCustomers table in Design view. First you have to click the name of the field you want to format.
Click the State field.
You can make sure that the contents of the State field are always capitalized by adding a to the Format box.
Click the Format box in the Field Properties section and type a greater than symbol(>).
Your table should look like Figure 4-14. Access will display the contents of the State field in uppercase, even if it was entered in lowercase.
Note: Remember that the Format property only changes how data is displayed onscreen, not how the data is actually stored in the field.
Click the Save button on the toolbar to save your changes.
Now let's see how the State field looks with its new format.
Switch to Datasheet view by clicking the View button on the toolbar.
Notice that the lowercase state abbreviation you entered back in Step 2 now appears in uppercase.
Table 4-7 contains formatting symbols for text fields.
Table 4-7. General and Text Formatting Symbols
Aligns text from the right
Displays value in color
TO MANUALLY FORMAT A TEXT FIELD:
MAKE SURE THE TABLE IS DISPLAYED IN DESIGN VIEW AND CLICK THE TEXT FIELD YOU WANT TO FORMAT.
CLICK THE FORMAT BOX IN THE FIELD PROPERTIES SECTION.
ENTQR THE APPROPRIATE TEXT FORMATTING SYMBOLS.