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
 
Back
Top