Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I get a selection from a Drop Down to populate other field | Microsoft Word Help | |||
how can I copy and paste text in to a drop down form field | Mailmerge | |||
Drop down field - how to save selection | Microsoft Word Help | |||
datasource field selection change causing invalid data displayed | Mailmerge | |||
Text form field inside WORD table cell, odd selection behavior | Microsoft Word Help |