Calculation form field won't update

I

Impecunious

Hi,

I've got a calculation form field in Word that uses the formula
'=bok_benefit/bok_cost-1', where bok_benefit and bok_cost are two other
bookmarked text form fields. I've set both of these supporting fields
to "Calculate on exit", but for whatever reason, my calculation field
refuses to update when either of these fields are modified. I can F9
the field and it'll update, but because this document is going to be
used as a form, I obviously don't users to have to resort to this.

I'm trying to wrap up this form ASAP, and this problem is driving me
nuts. I'd definitely appreciate anyone's advice!
 
M

macropod

Hi Impecunious,

Did you protect the document for forms? "Calculate on exit" won't work if
you don't.

Cheers
 
G

Graham Mayor

You don't really need a form field for the calculation - use a Word formula
field instead
{={REF Bok_Benefit}/{REF Bok_Cost-1}}
Calculate on exit will force an update on such a field (unless it is in a
header/footer, when you need a macro run on exit from the field to update
it - eg the sample code at http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

macropod

Hi Graham,

It'd probably work better as:
{={REF Bok_Benefit}/{REF Bok_Cost}-1}
or:
{={Bok_Benefit}/{Bok_Cost}-1}
or even:
{=Bok_Benefit/Bok_Cost-1}

Cheers
 
G

Graham Mayor

I had assumed the '-' to be part of the bookmark name ;)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
I

Impecunious

Guys,

Thanks for your suggestions.

Unfortunately, I get the same result (no automatic update) even after
trying a formula reference. My form's in protect mode, and what's
worse, I can create a separate "quick and dirty" document with these
three fields and the text form field calculation fires fine.

Now what? Thanks again.
 
I

Impecunious

Guys,

Thanks to all for your suggestions. Unfortunately, I'm getting the
same problem with this reference approach as well - the answer won't
update once either one of the supporting fields are modified. By the
way, I've tested this with the form in protected mode.

Now what?

Thanks.
 
I

Impecunious

Interesting... it turns out that my table of contents seems to be the
culprit. If I delete it, the calculation fires away.

Now I'm really irritated. This seems like a pretty significant bug.

Thanks to all for your help.
 

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