I have a form with a command button that has the focus when the form opens, how can i change it so that a combo box on the same form gets the focus on opening?
Hi,
Open the form in the design veiw and select the OnOpen Event of the Form and type the following between the lines
Me.YourComboName.SetFocus
Note: May be your CommandButton has focus already set on the OnOpenEvent. You have to change it.
When you finish your code will be look like below. Make sure to change "YourComboName" to name of your ComboBox.
<-------------*****----------->
Private Sub Form_Open(Cancel As Integer)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.