Share this Page URL

Chapter 3. Managing the Consistency, For... > Caption Property - Pg. 85

Managing the Consistency, Format, and Integrity of Your Data 85 The two text fields in this table--ExpenseType and Description--have their Field Size prop- erties set to 50 and 255, respectively. The larger field size is appropriate for the Description field because we might enter more than 50 characters from time to time. Changing the default field size for text and number fields and other options Like other Microsoft Office applications, Access has an Options dialog box in which you can change a number of default settings. If you want to change the default setting for the Field Size property for text and number fields, click Tools, Options. Click the Tables/Queries tab, and then change the values in the Default Field Sizes area. Quick Check Q. Why do you need to be cautious about changing the Field Size property for a table that already contains data? A. Reducing the size of the field could result in data loss--characters that exceed the reduced size are cut off, and precise numbers might be rounded. Caption Property The Caption property creates a label for a field. The text you enter in the Caption property appears in the label when the field is included on a form or a report and as a column heading when you include a field in a query or open the table in Datasheet view. If you leave the Caption property blank, Access uses the field's name as its caption. You can use the Caption property to make field names easier to manage and read. For example, you can enter Campaign ID or Campaign Number as the Caption property for the field named Cam- paignID. You could accomplish the same thing by renaming the field to Campaign ID or Campaign Number, but by changing just the caption, you make the field's name easier to read and avoid using a space in the field name, which means you don't need to enclose the name in brackets when you refer to it. However, it's a good idea to avoid long captions on a form that includes a number of text boxes, buttons, and other controls because the labels require a lot of space. When we created the CampaignExpenses table with the Table Wizard, the wizard added captions by default, using Expense Type as the caption for the ExpenseType field, for example. In the following steps, we'll add a caption for another field in the HelloWorld database. Enter captions for fields 1. 2. 3. Open the MarketingCampaigns table in Design view. Click in the Country field. In the Field Properties area, enter Campaign Country as the Caption property for the field. On the File menu, click Save, and then click Datasheet View on the View menu. As you can see, the caption you entered is displayed in the column heading: