Forms - Controls to Calculate Totals WITHOUT Using Legacy Controls

D

dewaaz

Hi

I'd like to use forms in Word 2007 to create some fields where numbers are
typed in, and then another field gets updated at the bottom of the page with
the sum of all the previous numbers.

This can be done in Word 2003, and even in Word 2007 through legacy controls
- fine - but to use legacy controls in 2007, the document must be protected.


In Word 2007, dropdown lists don't require the document to be protected -
great! But Word 2007 doesn't seem to allow fields where numbers are inputted
and a total given elsewhere - it seems like legacy controls must be used. But
then because they are legacy controls, the document needs to be protected.

Is there a way to get numbers in some fields and totals outputted somewhere
using native Word 2007 functionality, and not legacy controls? I ask this
because then I would not need to protect my document. I can do this with
dropdown lists currently, but there doesn't seem to be a way to have the sums
and totals using numbers, unless legacy controls are used.

I amaware of being able to protect portions of a document using section
breaks, but I want to allow editing of a table in which contains controls -
in short, I just want to be able to create a form with no protection - which
can be done with dropdown lists - but I want to have controls for
manipulating numbers WITHOUT having to resort to legacy controls (which
require protection).


Thanks to whoever can help :)
 
G

Graham Mayor

As you have discovered the new Word 2007 controls are somewhat limited. If
you want a more complex form you are going to have to use a protected form -
or you could create as userform to gather your data, perform your
calculations and populate the form For the basics, see Word MVP FAQ -
Userforms
http://word.mvps.org/FAQs/Userforms.htm

for a more in depth explanation, see
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm

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


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

michelle

Graham - do you know how to do the calculation when you protect your
document? I put in a legacy form field and selected calculation in the
properties section and then wrote =texta-textb what am i doing wrong?

thanks
 
G

Graham Mayor

If you are using legacy form fields then the default field bookmarks names
would be Text1 and Text2 not texta and textb, so the Text3 type would be set
as a calculated field with the calculation =Text1- Text2 and the calculate
on exit check box of Text2 should be checked.

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


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

michelle

Thanks that 's what i thought, but it doesn't seem to be updating. (sorry i
used a and b as examples, but i was actually using the bookmark names).
m
 
G

Graham Mayor

You only need to run an update macro on exit if you are using REF fields on
the header footer.
Instead of the calculated form field, unlock the form. Press CTRL+F9 to give
you {}
Between the brackets type = then CTRL+F9 then - (space minus space) then
CTRL+F9
In between the two other pairs of brackets type the bookmark names of the
two fields you wish to subtract thus

{={Text1} - {Text2}}

Relock the form. The field will probably show an error until you enter
something in Text1 and Text2, which is why a calculated form field would be
better here.


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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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