Hi All,
I have created a form where a user enters the 'number of full time staff
employed in an organisation' in text form field at the beginining of the
form. How do I make the result entered in this field is also displayed in
another text form field of another question asked in the form. For example:
Of the (Number taken full time staff employed) full time staff employed, how
many were recruited in the last 12 months:
Hope this makes sense, look forward to reading your replies.
Kind Regards
Ammo
Greg Maxey - 22 Apr 2005 00:40 GMT
Ammo,
Your terminology "text form field" leads me to suspect that you are working
with an online (or protected) form and not a userform. If this is correct
then something like this.
Lets say that you have bookmark named the field containing the number of
full time staff employed as "FTStaff" and you have formatted this field to
"calculate on exit" (Note: double click on the field in the unprotected
state to set the bookmark name and calc on exit)
Now you really don't need another text form field to repeat the data. You
can use a regular REF field
Put your cursor in the next question where you want the value to appear and
press CTRL+F9. Enter
FTStaff inside the brackets and toggle the field code.
See:
http://gregmaxey.mvps.org/Word_Fields.htm
and
http://gregmaxey.mvps.org/Repeating_Data.htm
If you really want to use another text form field you have a couple options.
IF the value in the FTStaff field is numberic (e.g., 25) the you could use a
calculation field with the formula =(FTStaff)
If the data in FTStaff could be anything but numeric (e.g., Five) then you
will need an on exit macro to run from FTStaff to set the value of the other
field. Lets call that field bookmark FTStaff2
Sub SetValue()
Dim FF As FormFields
Set FF = ActiveDocument.FormFields
FF("FTStaff2").Result = FF("FTStaff").Result
End Sub

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Hi All,
>
[quoted text clipped - 12 lines]
>
> Ammo
Dian D. Chapman, MVP - 22 Apr 2005 22:11 GMT
In addition...this article will provide some insight to the process...
Pass Repeated Information in a Word Document
http://www.computorcompanion.com/LPMArticle.asp?ID=224
Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine
Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html
>Hi All,
>
[quoted text clipped - 11 lines]
>
>Ammo