May 15, 2002 #1 bros Programmer Jul 14, 2000 57 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???
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???
May 16, 2002 #2 Guest_imported New member Jan 1, 1970 0 Use Maskedit object instead of text box. makedit have this functionality built in. Upvote 0 Downvote
May 16, 2002 #3 lavomar1 Programmer May 13, 2002 17 CA If the code always hava the same lenght you can use : ... Text1_KeyPressed(... If (Len(Text1) = <WantedLenght>) Then Text2.SetFocus Upvote 0 Downvote
If the code always hava the same lenght you can use : ... Text1_KeyPressed(... If (Len(Text1) = <WantedLenght>) Then Text2.SetFocus
May 16, 2002 #4 CajunCenturion Programmer Mar 4, 2002 11,381 US 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 Upvote 0 Downvote
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