Microsoft KB Archive/126255

= WD: Calculation Form Field Returns "$ 0" =

Article ID: 126255

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q126255



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:  Double-click the calculation field to be altered. In the Form Text Field Options dialog box, type a number sign ( # ) in the Number Format box and choose OK. Press ALT+F9 (in page layout view) or select the field and press SHIFT+F9. This enables you to view the field code. 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.

Additional query words: 6.0 winword 7.0 word95 word6 word7 word97

Keywords: kbfield kbualink97 KB126255

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.