View Single Post
  #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
--------------------