View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey
 
Posts: n/a
Default Use the IF, THEN statement in Word

You will need to run a macro something like the following on exit from your
first dropdown field.

Sub SwapOptions()
Dim oFFld As FormFields
Dim i As Integer
Set oFFld = ActiveDocument.FormFields
Select Case oFFld("Dropdown1").Result
Case Is = "A"
For i = oFFld("Dropdown2").DropDown.ListEntries.Count To 1 Step -1
oFFld("Dropdown2").DropDown.ListEntries(i).Delete
Next
oFFld("Dropdown2").DropDown.ListEntries.Add "Apples"
oFFld("Dropdown2").DropDown.ListEntries.Add "Appricots"
Case Is = "B"
For i = oFFld("Dropdown2").DropDown.ListEntries.Count To 1 Step -1
oFFld("Dropdown2").DropDown.ListEntries(i).Delete
Next
oFFld("Dropdown2").DropDown.ListEntries.Add "Blueberries"
oFFld("Dropdown2").DropDown.ListEntries.Add "Butterbeans"
Case Else
End Select
End Sub

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

"Alyssa" wrote in message
...
For example, I want a statement that tells me this:
If (dropdown box1) equals (A), then I want 2 options yielded, if (dropdown
box1)equals (B), then I want 2 different options yielded, etc.