How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Greg Maxey Your Own Question

Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience:  Microsoft Word Most Valuable Professional (6 years)
16468162
Type Your Question Here...
Greg Maxey is online now
A new question is answered every 9 seconds

Ask a Microsoft Word Question I am making a form with conditonal

Resolved Question:

Ask a Microsoft Word Question
>I am making a form with conditonal drop down fields. I know I can make a drop down field conditional on another one. However, I need to make two or three different drop down fields conditional on a single other field. is this possible?
Thanks,
Jeff
Submitted: 3 years ago.
Category: General
Expert:  Greg Maxey replied 3 years ago.

Yes it is possible. The below link shows you how to make a DD bookmarked "DDSecondary" dependent on a selection in another dropdown bookmarkd "DDPrimary"

 

All you would need to do is create the additional dropdown objects e.g.:

 

Dim oDDim oDD As DropDown
Set oDD2 = ActiveDocument.FormFields(AnnotherDD).DropDown

and then add the necessary lines of code in the Case statements.

Customer: replied 3 years ago.

Greg,

 

Thanks for the quick response. I think I understand, but I am not a programmer. I've tried a couple times to modify my form per your instructions. So far it sort of works (I can get options to show up on the second conditional field, but they are not the correct options) but I still have problems. I suspect it is just coding errors on my part. Let me see if i can figure out what I may still be doing wrong. If I can get it to work correctly, I'll accept your answer by tomorrow. If not, I may need some additional guidance.

 

Jeff

Customer: replied 3 years ago.

Greg,

 

I still have a minor problem. I can get everything to work if my two conditional fields have the same number of options. For instance, given the first field is dropdown1, I can get the fields identified as dropdown2 and dropdown3 to both work if they each have 14 entries. If dropdown2 has 14 entries and dropdown3 has 7 entries, I can't seem to program them properly.

 

Here is an excerpt of my programming for this step:

Case 1 ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Clear ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Clear For var = 1 To 14 ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Add Name:=DefenceDD2(i) ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Add Name:=DefenceDD3(i) i = i + 1 Next ActiveDocument.FormFields("Dropdown2").DropDown.Value = 1

ActiveDocument.FormFields("Dropdown3").DropDown.Value = 1

Case 2

 

In this case, DefenceDD2 is a list of 14 entries. DefenceDD3 is a list of 7 entries. I get error messages. I can put seven blank lines in DefenceDD3, but that just doesn't seem to be the proper way to do it.

 

If you can mark up this excerpt to show me how to program it properly, I would appreciate it. If that is beyond the scope of your answer, I understand. You have given me enough that I can make it work, even if my programming sucks.

 

Thanks,

 

Jeff

Expert:  Greg Maxey replied 3 years ago.

Well you didn't explain what DefenceDD2 or DefenceDD3 are but I assume they are arrays containing the list values. You are getting the error because you are trying obtain data that is out of scope.

 

Try this:

Sub DD1OnExit()
Dim var As Long
Dim aDefDD2() As String
Dim aDefDD3() As String
aDefDD2 = Split("A1,A2,A3,A4,A5,A6,A7,A8,A(,A10,A11,A12,A13,A14", ",")
aDefDD3 = Split("Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,Golf", ",")
Select Case ActiveDocument.FormFields("DropDown1").DropDown.Value
Case 1
ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Clear
ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Clear
For var = 0 To 13
ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Add Name:=aDefDD2(var)
On Error Resume Next
ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Add Name:=aDefDD3(var)
On Error GoTo 0
Next var
'Or do it like this:
ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Clear
ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Clear
For var = 0 To UBound(aDefDD2)
ActiveDocument.FormFields("Dropdown2").DropDown.ListEntries.Add Name:=aDefDD2(var)
Next var
For var = 0 To UBound(aDefDD3)
ActiveDocument.FormFields("Dropdown3").DropDown.ListEntries.Add Name:=aDefDD3(var)
Next var
ActiveDocument.FormFields("Dropdown2").DropDown.Value = 1
ActiveDocument.FormFields("Dropdown3").DropDown.Value = 1
Case 2
End Select
End Sub

Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience: Microsoft Word Most Valuable Professional (6 years)
Greg Maxey and 53 other General Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Ron

    ASE Certified Technician

    Satisfied Customers:

    21597
    23 years with Ford specializing in drivability and electrical and AC. Ford certs and ASE Certs
< Last | Next >
  • http://ww2.justanswer.com/uploads/FO/fordguy4u/2011-12-17_222940_HPIM1257.64x64.JPG Ron's Avatar

    Ron

    ASE Certified Technician

    Satisfied Customers:

    21597
    23 years with Ford specializing in drivability and electrical and AC. Ford certs and ASE Certs
  • http://ww2.justanswer.com/uploads/lyeung1/2010-07-25_032152_tn_IMG_0241.JPG Dr. Y.'s Avatar

    Dr. Y.

    Urologist

    Satisfied Customers:

    18606
    I am fellowship trained specializing in general urology and reconstructive urology.
  • http://ww2.justanswer.com/uploads/docjohn174/2008-12-13_170143_johnask.jpg John's Avatar

    John

    Home Appliance Technician

    Satisfied Customers:

    13453
    Appliance repair business owner for over 43 years.
  • http://ww2.justanswer.com/uploads/MU/multistatelaw/2011-11-27_173951_Tinaglamourshotworkglow102011.64x64.jpg Tina's Avatar

    Tina

    Lawyer

    Satisfied Customers:

    8620
    JD, BBA Over 25 years legal and business experience.
  • http://ww2.justanswer.com/uploads/dermdoc19/2010-09-30_160749_Photo_122807_015.JPG dermdoc19's Avatar

    dermdoc19

    Dermatologist

    Satisfied Customers:

    3911
    30 years practice in general and cosmetic dermatology
  • http://ww2.justanswer.com/uploads/BI/birddoctor/2012-6-22_173214_birddoctor.64x64.png Dr. Pat's Avatar

    Dr. Pat

    Bird Veterinarian

    Satisfied Customers:

    3441
    25+ years working primarily or exclusively with birds
  • http://ww2.justanswer.com/uploads/RY/rydergar/2012-6-6_192240_IMG0328.64x64.JPG Dr. Gary's Avatar

    Dr. Gary

    Cat Veterinarian

    Satisfied Customers:

    3369
    DVM, Emergency Veterinarian, BS (Physiology)