Dependent Drop-down Boxes

sclark

Yamo be there
Local time
Yesterday, 21:38
Joined
Mar 1, 2007
Messages
60
Anyone know some simple code to make a secondary drop-down (not a pick list) dependent on the selection of the primary drop-down? I have the code that adds the 30 values (why I used a drop-down vs. a pick list) for the primary drop-down which works well. I know that I need code in the change event of the primary drop-down that references the primary values and establishes the secondary domain values, but not sure of the exact syntax.
 
Do a search on the forum on 'Cascading Combo Boxes'.
 
Thanks! Lots of good info for Access combo boxes, but I did not see any for a Word document.
 
Oh - Darn... Didn't even notice it was a Word issue. Maybe somebody else can help, I've never done this type stuff in Word....
 
Where is the data for these boxes coming from? I've done similar in excel and essentially you need to iterate through the list and where the primary value matches what is in the primary dropdown you need to use the additem method of the second combo box for the secondary domain value.
 
The data is created programatically by using the ".AddItem" VB command in Word. I have created dependent comboboxes in both Access and Excel, and understand the logic. I just need nelp with the VB syntax in Word.
 
I did use something similar for the primary dropdown. Then for the secondary (dependent) dropdown, I fell back on a series of If Then and AddItem statements to populate the secondary. Probably pretty crummy programming. I am sure that there is a much better (and shorter) way to do it using arrays and cases, but I have it in good working order now

Thanks!.
 

Users who are viewing this thread

Back
Top Bottom