Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scanner

Status
Not open for further replies.

bros

Programmer
Jul 14, 2000
57
0
0
MY
pls help,
when i scan a code "1234566666" to a text box, then I like the cursor auto jump to the next text box.
How is the coding???
 
Use Maskedit object instead of text box. makedit have this functionality built in.
 
If the code always hava the same lenght you can use :

... Text1_KeyPressed(...

If (Len(Text1) = <WantedLenght>) Then Text2.SetFocus
 
You may want to consider using the Change event rather than the KeyPress event.

The KeyPress event is fired before the character is placed into the box. The Change event is fired after the character is entered into the box.

Sub txtBox_Change()

If len(txtBox.Text) = MaximumLength Then
txtBoxNext.SetFocus
End IF

End Sub
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top