Setting a form field that populates based on other fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with numerous text fields. I want several other text fields to
populate with the same text entered in a previous field. How do I do this?
 
You can use a macro that runs as you exit each form field, here is an example
of the code:

Fillfields Macro
ActiveDocument.FormFields("Text3").Result =
ActiveDocument.FormFields("Text1").Result

End Sub

This will fill in the form field that has the bookmark Text3 with whatever
has been typed in the form field with the bookmark Text1. Set the form field
properties for each field to run your macro On Exit and you should be able to
make your document so that you only have to complete each item once. Remove
the tick in the Fill-in Enabled box for the fields that you are going to
complete with your macro so that the user won't tab to them.

Andrea Jones
www.allaboutoffice.co.uk
www.allaboutclait.com
 
A macro is entirely unnecessary and pointless.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Andrea Jones said:
You can use a macro that runs as you exit each form field, here is an example
of the code:

Fillfields Macro
ActiveDocument.FormFields("Text3").Result =
ActiveDocument.FormFields("Text1").Result

End Sub

This will fill in the form field that has the bookmark Text3 with whatever
has been typed in the form field with the bookmark Text1. Set the form field
properties for each field to run your macro On Exit and you should be able to
make your document so that you only have to complete each item once. Remove
the tick in the Fill-in Enabled box for the fields that you are going to
complete with your macro so that the user won't tab to them.

Andrea Jones
www.allaboutoffice.co.uk
www.allaboutclait.com
this?
 
You need a REF field instead of another form field. See
http://gregmaxey.mvps.org/Repeating_Data.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

DR Mendoza said:
I have a form with numerous text fields. I want several other text fields to
populate with the same text entered in a previous field. How do I do
this?
 
Suzanne: I bookmark any field I want to replicate information thru a form,
then insert a cross-reference to the bookmark in the cell or location that I
want the information pulled thru the document (so - not another form field).
Is there any benefit to adding the "REF" field? Regards... Lenny
 
First of all, you don't need to insert a bookmark for a form field; it has
one already by default. In the Form Field Options dialog you can see it and
rename it if you like. And when you insert a cross-reference, you are
inserting a REF field.
 
I have been attempting to insert REF fields in my document so that the text
that would be typed into a form text field will populate other places in my
document. I have followed the instructions found at the link below and it is
just not working in my document. It appears as though the REF field is there
because there is a blank space where I am inserting it but then when I
protect the document and type in the form field it is referencing and tab to
the next nothing happens where there is a blank representing a Reference
field.

I have looked over the instructions several times and cannot figure out
where I am going wrong.
 
Did you remember to select the "Calculate on exit" option in the Text Form
Field Options dialog box?
 
In the Form Field Options for the form field, do you have "Calculate on
exit" checked?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
Yes I have checked the "Calculate on exit" option of the form field that will
be used to populate the other sections where I have entered a REF field.

Any other ideas?
 
If the REF fields are in the header/footer or in text boxes, you will need
macro code to force an update, run on exit from the field. You can use the
sample code at http://www.gmayor.com/installing_macro.htm which should
suffice for most purposes.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
I am just trying to add REF fields in the regular body of the document (not
in the header, footer, a text box, or another form field). I have tried by
typing "REFText2(which is the bookmark)" and then selecting it and typing
ctrl+F9.

At that point it turns into {REFText2}.

Then, I protect the form and type (e.g., "Barb Moore") into the field that
is bookmarked Text2 and click tab to the next form field. My understanding
of the instructions at the link below are that at that point the {REFText2}
should turn into Barb Moore.

Am I midunderstanding the purpose and function of the REF field?
 
Back
Top