PDA

View Full Version : Solved: Combo Box Button



FrymanTCU
04-15-2008, 02:26 PM
I was wondering if it is possible to make a combo box into a kind of button. So based on the value selected, the code would execute a particular code in the background. Not all of the values would need to cause an action just some of them.

If there a diffent way to do this let me know, right now the combo box is populated with a SQL statement but I am flexible to any solution. Thanks

Trevor
04-15-2008, 02:47 PM
fryman,
To cause an even to fire on a selection, without sending the focus(curser) somewhere else use the onchange even for the combobox, and you can use a select case for your events

Private Sub CoboBox_OnChange()
Select Case ComboBox
Case "A"
'Do Nothing
Case "B"
(Events to perform)
Case "C"
(Enents to perform)
Case "D"
' Do nothing
End Select
End Sub

FrymanTCU
04-16-2008, 01:48 PM
Trevor thanks that worked perfectly.