How to link combo boxes in Word
I have a protected Word 2003 form that includes two columns, "Department" and "Name" (this is not a userform). Department contains 13 items and the item in the corresponding Name column is a name of someone in that department. Some of the Name fields are already ActiveX combo boxes because there is more than one person in that department. I am using ActiveX combo boxes here because I want the users to be able to type or paste in a name that's not in the list.
Now I would like to make the Department rows list boxes that are dynamically linked to the Name rows, so that when one selects a department, the Name list in the same row re-populates to show the list of names for that department. This list would be un-editable; hence the list box (could also be a formfield dropdown as well).
I have no idea how to do this, nor how to do it efficiently without tons of code. Since all of the dropdown lists in each Department column would be the same and only the Name lists would change, is there a way to call the same routine when clicking any of the Department lists that reads the list number (or other identifier) and uses perhaps a case statement to populate the corresponding Name row just on the click event?
By the way, this protected form uses both form fields and Activex controls and they work perfectly well together. I don't know what the conflict is that I've seen reported in other threads about this.
Aug 25 2010: I found a solution that works, although it seems like it has a lot of code. I was hoping to get some feedback on a streamlined way of doing this, but no one has offered any.
Last edited by Marrick13 : August 25th, 2010 at 07:20 PM.
Reason: found solution
|