Microsoft Office Tutorials and References
In Depth Information
Chapter 4: Doing Calculations in Forms and Subforms (and Reports)
3. If it isn’t already visible, display the property sheet for the control by
right-clicking the new text box and choosing Properties from the
4. Click the Data tab of the property sheet to display the data properties.
The Control Source property is the first property on the Data tab —
and lo! It’s blank.
5. Type an expression, starting with an equal sign, directly in the text
Enter your expression as shown in Figure 4-1. You could also type the
expression in the Control Source property on the Data tab of the
property sheet. As an alternative to typing, you can use the Expression
Builder to build your expression. Click the Build button, which looks like
an ellipsis (…), at the right end of the Control Source property in the
property sheet. The Expression Builder appears. (See Book III, Chapter 2
for details on how the Expression Builder works.)
sure to start
it with an
6. Click the Other or the All tab of the property sheet, and change the
Name property to something descriptive.
Don’t leave it named something like Text17, which won’t give you much
of a hint about what you had in mind when you look at this control later.
If you want to edit the expression later, you can change the Control
Source entry on the property sheet.
Expressions can get long, and it can be hard to see them. When you’re
editing a long expression, you can press Shift+F2 to display it in the Zoom dialog
box, as shown in Figure 4-2, or you can click the ellipsis (...) button again to
display the Expression Builder.