|
-
Sep 1st, 2000, 08:46 AM
#1
Thread Starter
Lively Member
I have created a form with a text box named txtpart. There is no problem with the program if users enter data into this text box using a standard keyboard. However if they used a scanner to scan in a barcode and hit the <enter> key on the keyboard, this program terminate itself and returned to window!
I have noticed that after scanning data into this text box, I need to use the mouse to move the hair-line cursor from its leftmost position inside the text box to the position after the last character. If I hit the <enter> key now, my program works fine!
How can I control the cursor movement? I thought the cusror should automatically station itself at the end of the data after each scan??
Private Sub Txtpart_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then
find_part
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|