Consulting

Results 1 to 4 of 4

Thread: Conditional Dropdown entires

  1. #1
    VBAX Newbie
    Joined
    May 2012
    Posts
    3
    Location

    Conditional Dropdown entires


    Okay I am trying to use a group of check boxes, to populate the options in a dropdown box.

    First choice will be USDA or FHA, as I said, placed in check boxes. Based on that selection, I want a secondary dropdown box to be populated with options. If USDA is selected one set of options will display but if FHA is selected a different set of options will populate.

    I am almost certain this can be done, though I've never seen it in a word doc before.

    Screen shots are here: racmtg.com/test/screenshot.html
    Last edited by danield; 05-09-2012 at 08:55 AM.

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,335
    Location
    It will help if you identify what type of check boxes and dropdowns. Are you dealing with a userform, content contorls or legacy formfields?

    Since content controls and formfields don't have "change" events you will have to use the "Exit" events for your code. Something similiar is illustrated here:

    http://gregmaxey.mvps.org/word_tip_p...own_lists.html

    You would basically replace the primary dropdown with a checkbox.
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    VBAX Newbie
    Joined
    May 2012
    Posts
    3
    Location
    That link you provided was my solution thank you. It doesn't seem to be populating the secondary DD until I actually click it to make my selection, but it will work. For now if you make a Primary selection then make a Secondary selection, then go back and change the primary it will keep the secondary choices until you actually click on it again. It is changing the DD options it is just not registering that they are changed until you click on the secondary DD to select an option.

  4. #4
    VBAX Newbie
    Joined
    May 2012
    Posts
    3
    Location
    [VBA]Sub OnExitDDListA()
    Dim oDD As DropDown
    Set oDD = ActiveDocument.FormFields("Dropdown2").DropDown
    'Clear previous list
    oDD.ListEntries.Clear
    'Repopulate list based on user selection
    Select Case ActiveDocument.FormFields("DropDown1").Result
    Case "USDA"
    With oDD.ListEntries
    .Add "Purchase – Standard"
    .Add "Purchase – Repair Escrow – add $450 if > $2,500"
    .Add "Refinance – Streamline Pilot State Eligible"
    .Add "Refinance – Streamline – Non-Pilot State"
    .Add "Refinance – Full Appraisal – Include closing costs"
    End With
    Case "FHA"
    With oDD.ListEntries
    .Add "FHA Standard"
    .Add "FHA 203B"
    End With
    End Select
    lbl_Exit:
    Exit Sub
    End Sub [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •