Reply
 
Thread Tools Display Modes
  #1   Report Post  
chesspupil chesspupil is offline
Junior Member
 
Posts: 0
Default Form Field - Drop down selection causing auto text

I do inspection work on submarines that must be documented. Each Boat has it own ID code that I would like to appear in another are of the form based on what boat I select from a Form filed drop down list.


Please see the attachment:

Block one I select a boat in the drop down. In block 2 I would like the first 5 numbers to automatically appear based on the selection in block 1. Currently they are in matching order but it is easy to mis-select the wrong 5 digit number if you are not careful or familiar with the layout.

I have no preference for how its done, just that it works...(VBA or Macro)

Document file available at:
Code:
http://www.msofficeforums.com/word/3644-form-field-drop-down-selection-causing-auto-text.html#post7847
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Form Field - Drop down selection causing auto text

Say your Dropdown is bookmarked "Name" and your text field for the Unit
Identification Code is bookmarked "UIC." You need to set a macro to run on
exit from the DD.

Sub NameDDOnExit()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
Select Case oFF("Name").Result
Case "TOPEKA"
oFF("UIC").Result = "12345"
Case "PASADENA"
oFF("UIC").Result = "54321"
Case "HELENA"
oFF("UIC").Result = "99999"
End Select
End Sub


chesspupil wrote:
I do inspection work on submarines that must be documented. Each Boat
has it own ID code that I would like to appear in another are of the
form based on what boat I select from a Form filed drop down list.


Please see the attachment:

Block one I select a boat in the drop down. In block 2 I would like
the
first 5 numbers to automatically appear based on the selection in
block
1. Currently they are in matching order but it is easy to mis-select
the wrong 5 digit number if you are not careful or familiar with the
layout.

I have no preference for how its done, just that it works...(VBA or
Macro)

Document file available at:

Code:
--------------------

http://www.msofficeforums.com/word/3....html#post7847
--------------------



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Form Field - Drop down selection causing auto text

Say your Dropdown is bookmarked "Name" and your text field for the Unit
Identification Code is bookmarked "UIC." You need to set a macro to run on
exit from the DD.

Sub NameDDOnExit()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
Select Case oFF("Name").Result
Case "TOPEKA"
oFF("UIC").Result = "12345"
Case "PASADENA"
oFF("UIC").Result = "54321"
Case "HELENA"
oFF("UIC").Result = "99999"
End Select
End Sub


chesspupil wrote:
I do inspection work on submarines that must be documented. Each Boat
has it own ID code that I would like to appear in another are of the
form based on what boat I select from a Form filed drop down list.


Please see the attachment:

Block one I select a boat in the drop down. In block 2 I would like
the
first 5 numbers to automatically appear based on the selection in
block
1. Currently they are in matching order but it is easy to mis-select
the wrong 5 digit number if you are not careful or familiar with the
layout.

I have no preference for how its done, just that it works...(VBA or
Macro)

Document file available at:

Code:
--------------------

http://www.msofficeforums.com/word/3....html#post7847
--------------------



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get a selection from a Drop Down to populate other field kmt1984 Microsoft Word Help 3 January 8th 09 06:42 AM
how can I copy and paste text in to a drop down form field Jeff Leggett Mailmerge 2 September 12th 08 01:21 PM
Drop down field - how to save selection Mifty Microsoft Word Help 2 April 21st 08 02:52 PM
datasource field selection change causing invalid data displayed deb Mailmerge 0 January 7th 08 10:14 PM
Text form field inside WORD table cell, odd selection behavior pwrichcreek Microsoft Word Help 1 October 11th 05 03:57 PM


All times are GMT +1. The time now is 06:08 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"