Prevost
Board Regular
- Joined
- Jan 23, 2014
- Messages
- 198
Hi There,
I have a form with two combo boxes. The First is named cboxNoSpeeds (and the user can choose 1 or 2 for the number of speeds value) and the second is named cboxHP1 (and the intent is for the user to be able to select all the horsepower values that have the corresponding speed value. Now I have looked for this existing question and I think I have the answer almost correct. Here is the code that I have:
But whenever I pick a speed, I get the following pop up window (that I do not want). Thanks for any help!
I have a form with two combo boxes. The First is named cboxNoSpeeds (and the user can choose 1 or 2 for the number of speeds value) and the second is named cboxHP1 (and the intent is for the user to be able to select all the horsepower values that have the corresponding speed value. Now I have looked for this existing question and I think I have the answer almost correct. Here is the code that I have:
Code:
Option Compare Database
Option Explicit
Private Sub cboxNoSpeeds_AfterUpdate()
Me.CBoxHP1.RowSource = "SELECT HP1 FROM tblWoundFrameInfo WHERE Speeds = Me.CBoxNoSpeeds ORDER BY HP1"
Me.CBoxHP1 = Me.CBoxHP1.ItemData(0)
End Sub
But whenever I pick a speed, I get the following pop up window (that I do not want). Thanks for any help!