How to activate a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that contains a text box and some other controls. After a
user uses one of the other controls, I would like to activate the text box
so that the user can immediately type in it without clicking it first.

Thanks for any help!
 
It depends on the control. For an option button:

Private Sub OptionButton1_Click()
Me.TextBox1.SetFocus
End Sub

Or for another textbox:

Private Sub TextBox1_Change()
If Len(Me.TextBox1.Text) = 4 Then
Me.TextBox2.SetFocus
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top