Article ID: 211253 - Last Review: December 6, 2000 - Revision: 1.0 WD2000: Calculation in Form Field Shows Wrong Result
This article was previously published under Q211253 On This PageSYMPTOMS
When a form field calculation involves another calculated form field, the
results may be incorrect. The two scenarios below illustrate this symptom. Scenario 1: No Formatting in the Number Format of a Form FieldTYPE OF TEXTFORM ACTUAL EXPECTED FIELD EXPRESSION BOOKMARK RESULT RESULT ------------------------------------------------------------- NUMBER NONE Text1 100 100 CALCULATION =Text1 Text2 100 100 CALCULATION =Text1 + Text2 Text3 100200 200 Scenario 2: Dollar Sign on Either or Both Form FieldsTYPE OF TEXTFORM ACTUAL EXPECTED FIELD EXPRESSION FORMATTING BKMRK RESULT RESULT ----------------------------------------------------------------------- NUMBER NONE Dollar Sign Text1 100 100 CALCULATION =Text1 Dollar Sign Text2 $100 $100 CALCULATION =Text1 + Text2 Doesn't Matter Text3 $300 200 CAUSE
Word defines the bookmarks assigned to the Calculation form fields
incorrectly. As a result, Word does not correctly parse these form fields;
it concatenates them instead.
WORKAROUND
To work around these problems, use the method appropriate for your situation. Method 1: Avoid Referring to Any Other Calculation FieldsChange the final calculation to avoid referring to any other Calculation fields. Include all math formulas in one Calculation field. This method is only appropriate for simple calculations.In the earlier example, because the third form field includes a formula from the second form field, the entry in the third form field expression needs to be changed to the following: Text1 (Bookmark from the first form field) + Text1 (Expression from the second form field) Method 2: Redefine the Bookmarks So Word Calculates the Formula CorrectlyNOTE: You must repeat this procedure each time you change a particular form field in the Text Form Field Options dialog box.To redefine the bookmarks so Word calculates the formula correctly, use these steps with each incorrect Calculation form field:
Method 3: Define a New Bookmark That Includes the First Calculation FieldNOTE: You do not need to repeat this procedure if you change the form field in the Text Form Field Options dialog box.To define a new bookmark that includes the first Calculation field in your formula plus one space following it, follow these steps:
Method 4: In a Table, Use Table Cell References Rather Than Bookmark NamesUse table cell references rather than bookmark names in the Calculation form field.NOTE: This method works only if there are no other Number form fields in any table cell you reference in your Calculation form field. For example, change this calculation:
{FORMTEXT {=Text1 + Text2}}
{FORMTEXT {=A1 + A2}}
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|





















Back to the top