Automatically advance to next textbox

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

Guest

I am trying to advance to the next textbox when input for the current textbox
has reached its maximum length. In a different newsgroup I found this code
snipit, but I have not been able to use it.

Private Sub Text1_Change()
If Len(Me.Text1) = Me.Text1.MaxLength Then
Me.Text2.SetFocus
End If
End Sub

I use VS to program in VB.net, and this is for an aspx web page. The
problem is that SetFocus is not a member of
system.web.ui.webcontrols.textbox. I also tried 'focus', also to no avail.

TIA
Gil
 

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