WD: Calculation Form Field Returns "$ 0"

ID: Q126255

The information in this article applies to:

SYMPTOMS

If you add a calculation form field to a form and the result is in dollars, the field will return "$ 0" (without the quotation marks) if there are no values to calculate.

CAUSE

This occurs by program design and is consistent with other numeric display functions in Word.

RESOLUTION

To force the calculation field to return nothing if no values are available to compute, two number formats must be used.

While the form is unprotected, do the following:

1. Double-click the calculation field to be altered.

2. In the Form Text Field Options dialog box, type a number sign (#) in the

   Number Format box and choose OK.

3. Press ALT+F9 (in page layout view) or select the field and press
   SHIFT+F9. This enables you to view the field code.

4. Between the final two braces ({}), enter the number format desired.

   For example:

      {FORMTEXT { =A1 + B1} \# $#,##0.0;($#,##0.0)}

   Where "$#,##0.0;($#,##0.0)" (without the quotation marks) is the
   desired format when the value is not 0 (zero).

NOTE: The result of the calculation form field will be a whole number. The numbers being referenced are rounded to the nearest whole number. Any further editing of the calculation form field will cause the number formatting commands that were added to be removed from the field.

KBCategory: kbusage KBSubcategory: kbfield Additional query words: 6.0 6.0a 6.0c winword 7.0 word95 word6 word7 7.0a word97

Keywords          : kbualink97 kbfield 
Version           : 6.0 6.0a 6.0c 7.0 7.0a 97
Platform          : WINDOWS

Last Reviewed: February 6, 1998