Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Data entry entered in one field is automatically displayed in anot

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ammo - 21 Apr 2005 23:02 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.