var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: List Boxes That Change Based On Other Values
I am currently trying to make a set of Drop Down Lists where the values in the second list CHANGE when you make a selection in the first list.
I dont know how difficult this may be, but I am willing to give it a shot. I am having a hard time finding out what this is called in the help section... so im not really making any headway.
heres the idea...
If I select option 1 in the first drop down box, I should only be allowed to choose A, B, and C in the second.
If I select option 2 - D, E, and F
and so on and so on...
Thanks for any help in advance!
I should also mention that I noticed a spot below that talks about a similar idea, but I am not CODE savy at all... so some of it is cryptic...
Yep I had the exact same problem. Solution I used is to set the rowsource of the second dropdown-list accroding to the value selected in the first.
Originally Posted by voodoo_ca
I have to go now, but check out the earlier topic by me and if you dont succeed I'll post my code here tomorrow. ;-)
Thanks, ill take a look and see what I can figure out!
Here is a sample of what you are looking for:
You would put this code in the onchange event for the first combo box. It assumes that you are using a value list for the source.
That should get you headed in the right direction.
Select Case cmbfirst.Value
cmbsecond.RowSource = "'A';'B';'C'"
cmbsecond.RowSource = "'D';'E';'F'"
cmbsecond.RowSource = ""
Originally Posted by sionus
And when you want both comboboxes based on values from Tables, just put an SQL-statement as Rowsource (which can include a variable here).
var = cmbfirst.value
cmbsecond.Rowsource = "SELECT data FROM table WHERE condition = " & var