Showing combo box results from the results of another combo box

T

ttaylor993

I have a form with combo boxes. Other combo boxes on the form are populated
with a single result based on a Select query using the results from the first
combo box. As an example, the 1st combo box has a list of primary corporate
organizations. The 2nd, 3rd and 4th combo boxes list a single
sub-organization each based on the primary organization selected in the 1st
combo box. However, I have to click on the dropdown and select the only
option from each of the 2nd, 3rd and 4th combo boxes in order for the results
to show. How can I make the 2nd, 3rd and 4th combo boxes show their results
when the primary org is selected in the 1st combo box without clicking on the
dropdown for each? Should I use something other than a combo box for the
2nd, 3rd and 4th controls?
 
C

Clare-in-Sydney

Have you tried writing an on Click event procedure in your first combo box to
default the values of the other 3 combo boxes?
something like
Sub ComboBox1_Click ...
Me.ComboBox2 = me.ComboBox1 'or whatever value you need
me.ComboBox2.Requery
me.ComboBox3 = me.ComboBox1
me.comboBox3.Requery
me.ComboBox4= me.ComboBox1
me.ComboBox4.Requery
End Sub
 
T

ttaylor993

Thanks Clare, looks like this should work.

Clare-in-Sydney said:
Have you tried writing an on Click event procedure in your first combo box to
default the values of the other 3 combo boxes?
something like
Sub ComboBox1_Click ...
Me.ComboBox2 = me.ComboBox1 'or whatever value you need
me.ComboBox2.Requery
me.ComboBox3 = me.ComboBox1
me.comboBox3.Requery
me.ComboBox4= me.ComboBox1
me.ComboBox4.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top