Round a number in a control

Microsoft Office InfoPath 2003

Show All Show All

Round a number in a control

Formulas are stored in fields and are displayed in the controls that are bound to those fields. When designing a form, you can use a formula in a text box, rich text box, or expression box to round to the nearest integer a value that users type into a control on the form.

Note  You should use an expression box only if you do not want to use the rounded value in another calculation or save it as part of the form, because expression boxes only display data and do not store it.

  1. In design mode, double-click the control where you want to create the rounding formula.
  2. On the Data tab in the Control Properties dialog box, click Insert Formula Button image.

    Note  To create the formula by using the field's properties, right-click the field in the Data Source task pane, and then click Properties.

  3. In the Insert Formula dialog box, click Insert Function.
  4. In the Categories list in the Insert Function dialog box, click Math.
  5. In the Functions list, click round, and then click OK.

    ShowTip

  6. In the Formula box, double-click the text in parentheses.
  7. In the Data source list in the Select a Field or Group dialog box, click the field whose value you want to round.

Note  The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more