Multiple commands in After_Update

SoCal

Registered User.
Local time
Today, 13:36
Joined
Nov 7, 2012
Messages
16
Hello,

I'm new to the forum, and an intermediate Access user. I really would appreciate any help!

I have created a form with multiple combo boxes. The user selects a value from the first combo box. The result of this choice changes the selection of the second combo box. Here is my After_Update code:

Private Sub Combo20_AfterUpdate()
Me.Combo16.SetFocus
Me.Combo16 = ""
Select Case Combo20
Case "Driver"
Me.Combo16.RowSource = "DriverHeadTestQ"
Case "Irons"
Me.Combo16.RowSource = "IronHeadTestQ"
End Select
Combo16.Dropdown

End Sub

This works great - allows me to control the combo box list based on the selection in the first.

Now, I want to add another (third) combo box that does the same thing - changes the values based on the selection of the first combo box. How do I do this? Do I add additional commands to the above or do I need to add a separate event for the new (third) combo box?

Hope this make's sense, and Thanks!
 
If you want the 3rd combo's selections dependent on the first, you'd add to this code. If you want the 3rd combo's selections dependent on the 2nd, you have similar code behind the 2nd.
 
Thanks for that! Can you give me an idea about how that code would look based on my example?

Thanks!
 
Probably this type of thing:

Case "Driver"
Me.Combo16.RowSource = "DriverHeadTestQ"
Me.OtherCombo.RowSource = "OtherQuery"

I'd give the combos names that have meaning.
 
Sorry, but I don't know exactly where to insert the code for the third combo box. Can anyone help?
 

Users who are viewing this thread

Back
Top Bottom