WD: Calculation Form Field Returns "$ 0"

Last reviewed: February 5, 1998
Article ID: Q126255
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

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 : kbfield kbualink97
Version : 6.0 6.0a 6.0c 7.0 7.0a 97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.