Hey there,
I'm trying to resize a combo box with a mousedown event. The combo box has two columns, VendorID and VendorName. The VendorID is an autonumber, and therefore meaningless to the user. The autonumber is bound, so I'm using an unbound text box to hold the vendor name. What I'd like to do is make the combo box very small until the user clicks on the arrow, then allow it to grow in width so the vendor name can be seen for ease of selection, then reduce the width again so only the autonumber will be seen in the combo box, and the vendor name will be seen in the text field.
When I change the width property of the combo box on the mousedown event, I can no longer make a selection in the combo box. What gives? Here's my code:
thanks,
Mike
I'm trying to resize a combo box with a mousedown event. The combo box has two columns, VendorID and VendorName. The VendorID is an autonumber, and therefore meaningless to the user. The autonumber is bound, so I'm using an unbound text box to hold the vendor name. What I'd like to do is make the combo box very small until the user clicks on the arrow, then allow it to grow in width so the vendor name can be seen for ease of selection, then reduce the width again so only the autonumber will be seen in the combo box, and the vendor name will be seen in the text field.
When I change the width property of the combo box on the mousedown event, I can no longer make a selection in the combo box. What gives? Here's my code:
Code:
Private Sub cboTrans1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cboTrans1.Width = 5000
End Sub
Mike