Calculation using 2 other form fields (word 2002)

O

OTWarrior

I have collection of form fields in what will be a protected document, and I
want 2 of them to do a calculation in
text3

Text 1 and text 2 are (numbered) editable text form fields, which the user
can put a number into, and text 3, is a calculation.

The fields are bookmarked as text1, text2 and text3

I have battled with this, and so far if i get text 3's calculation to be
"Text1" then it displays it, and the same with "text2". however, I want them
to be multiplied by each other and the result to be displayed in text 3.
like so:

text1: 2 text2: 5 text3: 10

However, when i put
=PRODUCT({Text1},{text2})
into the calculation box, all i get is "t"

text1:2 text2: 5 text3: t

I have tried other variations such as = product{text1,text2} to no prevail.

Am I not able to use bookmarks to do calculations here? as I have tried doing
the calculation in code (using a macro), but I cannot reference the bookmarks
in VB for some reason.

Any assistance would be much appreciated.
 
P

Peter Jamieson

Have you tried

=text1*text2

? (You need to set the other two fields so they calculate on exit.

Peter Jamieson
 
O

OTWarrior

I tried that first, and it just comes up with "text1 not in table" in the
calculation box.
Thanks anyway.

I have looked at many forums and sites on this, and cannot seem to get an
answer, which leads me to believe that it cannot be done using bookmarks.
 
P

Peter Jamieson

I guess we must be doing things differently or else I haven't understood the
requirement. Here, on both Word 2003 and Word 2004, I
- inserted three text form fields from the forms toolbar, leaving their
boomark names as the default Text1, Text2, Text3
- set the first two to Text and "Calculate on Exit"
- set the last one to Calculated with calculation =Text1*Text2
- clicked the lock button
- entered e.g. 7 in text1 and 8 in text2, and got 56
I tried that first, and it just comes up with "text1 not in table" in the
calculation box.

I also tried a simple example in a table, which still seemed OK. You would
however get that result if your calculated field was in a table and the
bookmark names you were using looked like table cell names such as t1 and t2
(and if the field was not in a table and had =t1*t2, you would get a 0
result.

Perhaps something along those lines?

Peter Jamieson
 
O

OTWarrior

Thank you very much for your help, you have led me to the correct solution

=product(text1,text2)

it now works for that calculation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top