Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    synchronised combos (2000)

    Hello, when using forms and combo boxes, is it possible to syncronise using VB code. If possible could you please provide guidance on the coding.

    Many thanks Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: synchronised combos (2000)

    Do you mean combo boxes in the document created using the Forms toolbar, or do you mean a userform created in the Visual Basic Editor?

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: synchronised combos (2000)

    Thanks Hans, referring to the tool bar. If there is a more efficient way I am I open to learning as ever.



    Cheers.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: synchronised combos (2000)

    It depends on what you want to acccomplish. I have attached a document with two dropdowns and a text formfield. The document has been protected for forms.
    Make sure that macro security is not set to High when you open the document.
    If you select an item in the first dropdown, then press Tab, the second dropdown will be populated with items depending on the item in the first dropdown.
    To see how it is done, unprotect the document and double click the first dropdown. You'll see that an On Exit macro has been set. This macro populates the second dropdown:

    Sub UpdateDropdown()
    ActiveDocument.FormFields("Dropdown2").DropDown.Li stEntries.Clear
    With ActiveDocument.FormFields("Dropdown2").DropDown.Li stEntries
    Select Case ActiveDocument.FormFields("Dropdown1").DropDown.Va lue
    Case 1
    .Add "Apple"
    .Add "Bread"
    .Add "Cheese"
    .Add "Deodorant"
    Case 2
    .Add "Eggs"
    .Add "Frosties"
    .Add "Grapes"
    .Add "Honey"
    Case 3
    .Add "Ice cream"
    .Add "Jello"
    .Add "Kleenex"
    .Add "Liquorice"
    End Select
    End With
    End Sub
    Attached Files Attached Files

  5. #5
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: synchronised combos (2000)

    That is fantastic Hans, thank you.

    Darren.

  6. #6
    New Lounger
    Join Date
    Dec 2007
    Location
    London, Hertfordshire, United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: synchronised combos (2000)

    Brilliant
    Thank you

Posting Permissions

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