"Chris" <ch*********@tbgamericas.com> wrote in message
news:00****************************@phx.gbl...
I am new to VB.Net and I am developing a stand-alone app
that will only be using a RF scanner to enter
information. I was curious if anyone knew of any articles
or source code on how I could get the text box to execute
to TAB/ENTER when a certain number of characters have been
reached within a text box.
By doing a "Tab", i'm guessing you mean shifting the focus
to the next textbox. That would be done like this:
Private Sub txtOne_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles txtOne.TextChanged
'where txtOne and txtTwo are two textboxes on the form
If txtOne.Text.Length = 5 Then
txtTwo.Focus()
End If
End Sub
By doing and enter, I presume you want some action(s) to occur
when the box is full. For this, put the action into a sub(eg. MySub)
and call the sub like this:
Private Sub txtTwo_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles txtTwo.TextChanged
If txtOne.Text.Length = 5 Then
Call MySub()
End If
End Sub
Hope this helps,