Next question...
I'm trying to cater for all eventualities and make data entry as swift as possible on my form.
To that end, I have set several combo boxes to "drop down" if the user tabs to them, by using the "Enter" event.
This works exactly as I want it to, that is until the user clicks on the control rather than tabbing to it. What happens then is that the combobox drops and then closes up immediately. I then have to click the box again to get it to drop down to select the item I want.
I've tried handling the "Mouseclick" event to bypass the "Enter" event, but that doesn't work because the "Enter" event fires first.
What I'm aiming for is: on entering the control, automatically drop the list down, unless the control has been entered by clicking on it.
I expect I'm missing something obvious, but any suggestions?
Thanks.
I'm trying to cater for all eventualities and make data entry as swift as possible on my form.
To that end, I have set several combo boxes to "drop down" if the user tabs to them, by using the "Enter" event.
VB.NET:
Private Sub sexComboBox_Enter(sender As System.Object, e As System.EventArgs) Handles sexComboBox.Enter, numberissuedbyComboBox.Enter, methodComboBox.Enter, feeComboBox.Enter
If mainForm.isedit = False Then Exit Sub
SendKeys.Send("%{DOWN}")
End Sub
This works exactly as I want it to, that is until the user clicks on the control rather than tabbing to it. What happens then is that the combobox drops and then closes up immediately. I then have to click the box again to get it to drop down to select the item I want.
I've tried handling the "Mouseclick" event to bypass the "Enter" event, but that doesn't work because the "Enter" event fires first.
What I'm aiming for is: on entering the control, automatically drop the list down, unless the control has been entered by clicking on it.
I expect I'm missing something obvious, but any suggestions?
Thanks.