#1   Report Post  
Posted to microsoft.public.word.newusers
Dyno
 
Posts: n/a
Default Form Fields

Is it at all possible to create a double drop down from field ....

I am trying to create a drop down that will narrow the choices to the second
drop down....

Example : If you choose chocolat then the second drop down will not have any
pepper and salt to it


Thanks for your help


  #2   Report Post  
Posted to microsoft.public.word.newusers
Greg Maxey
 
Posts: n/a
Default Form Fields

Yes it is possible. Run a macro similiar to the following on entry to the
subordinate formfield:

Sub SetDDValue()
Dim oFld As FormField
Set oFld = ActiveDocument.FormFields("Dropdown2")
Select Case ActiveDocument.FormFields("Dropdown1").Result
Case "Chocolate"
oFld.DropDown.ListEntries.Add ("Sugar")
oFld.DropDown.ListEntries.Add ("Milk")
oFld.DropDown.ListEntries.Add ("Cocoa")
Case "Beans"
oFld.DropDown.ListEntries.Add ("Salt pork")
oFld.DropDown.ListEntries.Add ("Onions")
Case Else
'Do Nothing'
End Select
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Dyno wrote:
Is it at all possible to create a double drop down from field ....

I am trying to create a drop down that will narrow the choices to the
second drop down....

Example : If you choose chocolat then the second drop down will not
have any pepper and salt to it


Thanks for your help



  #3   Report Post  
Posted to microsoft.public.word.newusers
Dyno
 
Posts: n/a
Default Form Fields

Thanks for your help .....Much appreciated
"Greg Maxey" wrote in message
...
Yes it is possible. Run a macro similiar to the following on entry to the
subordinate formfield:

Sub SetDDValue()
Dim oFld As FormField
Set oFld = ActiveDocument.FormFields("Dropdown2")
Select Case ActiveDocument.FormFields("Dropdown1").Result
Case "Chocolate"
oFld.DropDown.ListEntries.Add ("Sugar")
oFld.DropDown.ListEntries.Add ("Milk")
oFld.DropDown.ListEntries.Add ("Cocoa")
Case "Beans"
oFld.DropDown.ListEntries.Add ("Salt pork")
oFld.DropDown.ListEntries.Add ("Onions")
Case Else
'Do Nothing'
End Select
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Dyno wrote:
Is it at all possible to create a double drop down from field ....

I am trying to create a drop down that will narrow the choices to the
second drop down....

Example : If you choose chocolat then the second drop down will not
have any pepper and salt to it


Thanks for your help





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
Form text fields are disappearing during a merge to new document. Trevor Drew Mailmerge 7 January 30th 06 09:35 PM
Default text shown in form fields Gitte Microsoft Word Help 1 January 2nd 06 03:16 PM
Replace mergefields with form fields jassi_Hayre Mailmerge 1 August 16th 05 10:49 PM
Having multiple form fields automatically updated jrwaguespack Microsoft Word Help 3 March 25th 05 07:43 AM
Email a protected document that contains Text Form Fields Dowza New Users 1 January 8th 05 10:31 AM


All times are GMT +1. The time now is 12:46 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"