Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Perth, Western Australia, Australia
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Drop down form fields (2003)

    I hope someone can help. I'm preparing a document that will be used as a template for a number of different organisations. I have set a number of drop down form fields throughout the document that holds the organisations names. Is there away to link all related Drop down form fields so I can change the first drop down and all the rest change to suit? I hope that makes sense!

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Drop down form fields (2003)

    We've had a number of threads on how to connect an Exit macro to a FormField which can change the contents of other FormField controls in response to the user's action. Is that what you meant? Here are some examples:

    Word form macro question (2002/2003) (update a different FormField)
    DropDown Form Field (update a protected part of the document text)

    Does this help?

  3. #3
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Perth, Western Australia, Australia
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    Thanks for the reply. Not sure if these threads are what I'm looking for. Basically all I want to do is link a number of related drop downs spread through out a document to the first or master drop down so when I select a company name in the first drop down all related drop downs change to match the first.

    Any thoughts?

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Drop down form fields (2003)

    The content in the related drop-downs is related but not identical, I assume. If you plan to build all these drop-downs in advance, you can use the macro approach described in the first thread listed above. If you try it and it doesn't work, you could post a sample document for experimentation.

  5. #5
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Perth, Western Australia, Australia
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    Thanks again for the reply - the contents in the related drop-downs would be identical, i.e. if I selected organisation ABC from the first drop down (that might have a number of options) it would be the same through out a document in all related drop downs

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Drop down form fields (2003)

    If you want the information in the drop-down to appear in other places, it would be easier to use a REF field that copies the value from the drop-down. Then you need a little bit of code to update the REF fields. That might have been in the second thread mentioned above.

  7. #7
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Perth, Western Australia, Australia
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    Thanks - I'll give it a shot

  8. #8
    Star Lounger
    Join Date
    Sep 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    I had a similar issue as you have. Don't know if this is the most efficient/ elegant solution, but it seems to work for me.
    Rather than use multiple drop down boxes use REF fields or text form fields. I ended up using a text form field and created macro that is run using the 'run macro on exit' function associated with the drop down box. The macro takes the value selected in the drop down box and copied it to the required position. The reason I used a text form field was for the 'look of the document'.

    I also check that the drop down box has one of the choices selected before copying the value and also return the focus to the drop down box if a selection has not been made. This requires an additional macro, the method I copied from on of the Microsoft FAQ articles.

    code is

    Sub DropDown()
    'make sure that the drop down box has a position selected
    'before the user is allowed to move to the next field.
    Name = Selection.Bookmarks(1).Name
    If ActiveDocument.FormFields(Name).Result = "Select Title" Then
    MsgBox "You must select a position title"
    Application.OnTime When:=Now + TimeValue("00:00:01"), Name:="GoBack"
    Exit Sub
    Else
    'Fill in the Coord text box
    ActiveDocument.FormFields("Coord").Result = ActiveDocument.FormFields(Name).Result
    End If

    End Sub
    Sub GoBack()
    ' ActiveDocument.FormFields("Division").Range.Fields (1).Result.Select
    ActiveDocument.FormFields(Name).Range.Select

    End Sub

    Hope that helps
    Cheers

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    You can do this without a macro. All you need to do with the first drop down form field is double click the field to go into Properties, then check the box "calculate on exit". Place REF fields to Dropdown1 (or whatever bookmark name the first dropdown has) & they should update as soon as you tab out of the first dropdown.

  10. #10
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Perth, Western Australia, Australia
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop down form fields (2003)

    Thanks Phil and Rob - will give your suggestions a go!

Posting Permissions

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