Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007 Calculation

Status
Not open for further replies.

gripper111

IS-IT--Management
Jun 28, 2011
15
US
I have a document which is a template. Within this document I added some text fields from the Developer tab. I then protected the document as a fill in form. Several of these fields I set the properties to Numbers and two of the fields I calculate and put the results in a third field called Text9. This calculation works correctly.

Now when I take the total in text9 and minus the amount in Text10 I am looking for the total in text11. My calculation formula in Text11 is "=(text9-text10)". I have tried with or without the (). My results is very odd. Instead of example 2500 in Text9 minus 500 in text10 which should be 2000 in Text11 I end of with "2500500".

For some reason it is just echoing back the amounts in these two other text boxes and not giving me a correct total. I have tried several different things and nothing seems to work.

Any suggestions ????

Thanks
 
I would make sure that all of those text boxes are 'numeric', because you may be subtracting one text from another text, and not number from another number.

You may alseo try: [tt]Val(text9) - Val(text10)[/tt] but that's just a guess...

Have fun.

---- Andy
 
Thanks Andrzejek.

I figured out the issue. Unlike Excel that allows you to easily sub total and such MS Word is not so kind. Since I was having a second calculation of a field that is a calculated value it error. So instead I wrote a different formula taking a different approach leaving out the calculated field and it worked fine.
 
This is a known, long-standing bug in calculation formfields. Use formula fields for the calculations instead.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top