• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. What Every Developer Needs to... > Using Expressions to Enhance Your Fo...

Using Expressions to Enhance Your Forms

As mentioned in the previous section, a control can contain any valid expression as its control source. When entering an expression as a control source, the expression must be preceded by an equal sign. The control source can be manually typed, or you can use the Expression Builder to make the process easier.

To add an expression to a control source, start by adding an unbound control to the form. To use the Expression Builder, click the control's Control Source property, and then click the ellipsis. The Expression Builder appears (see Figure 5.31). In the list box on the left, select the type of object you want to include in the expression. The middle and right list boxes let you select the specific element you want to paste into your expression. The Expression Builder is useful when you're not familiar with the specific syntax required for the expression. You can also enter an expression directly into the text box for the Control Source property. To view the expression more easily, you can use the Zoom feature (Shift+F2). The Zoom dialog box for the control source is pictured in Figure 5.32; the expression shown in the figure evaluates the PaymentAmt. If the PaymentAmt is greater than or equal to 1,000, the message “Big Hitter” is displayed; otherwise, nothing is displayed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint