Working with Tables

Close Window 

Using the Caption Property

Our favorite field names are short, contain no spaces, and use only letters and numbers. We’re willing to bet they’ll become your favorite ones, too, as soon as you start writing expressions for calculated fields.

On the other hand, we have to admit that seeing a label such as “YTDSales” at the top of our table datasheet leaves us rather cold – fields with cryptic names seem so, well, unfriendly.

The Caption property lets us have it both ways. It lets us create a long display name, such as "Year-to-Date Sales," while Access keeps the real name (YTDSales) behind the scenes, ready for use when we need it for an expression.

To create a caption for a field, open your table in Design view. Click to select a field in the top pane of the Design window, and type the text you want to use as a caption in the Caption field in the bottom pane. Then save the table.

Access uses the captions you create as column headings in table and query datasheets, and as field labels in forms and reports. You’ll use the field’s real name, not the caption, whenever you refer to it in an expression.

(Posted 01/21/01)