Here's our Microsoft Office Tip for.. April 30, 2001
Click Here to see a complete list of all of our previously released Tips!
Renaming Fields in a Query
Sometimes we take shortcuts when we name our fields, trying to make things easy. Little do we realize that we may complicate things down the road. For instance, TelNo may not be a good label for the telephone number control on a data entry form.
You're probably very familiar with Access's label behavior in this respect--Access will display the field's name in a text box's label component. If you base the form on a table, you'll have to reenter the label's Caption property. However, if you base the form on a query, you can create a new reference to that field. For instance, if your field's name were TelNo, instead of just dragging that field to a Field cell in the query design grid, you'd enter the expression
Telephone Number: [TelNo]
That way, Access would display the TelNo field but label it Telephone Number.
Of course, if you're working with only one form, this behavior won't make much difference. You can reenter the field name in the label control, or you can reenter it in the query design grid, but either way, you're still reentering the field name. However, if you base several objects on this query, you can avoid reentering the field name.