bigracefan
Programmer
I'm having an intermitent problem with my code or scanner. When I scan a barcode, it splits the scan into the textbox that has focus and the next textbox that gets focus. The premiss is scan barcode 1 into textbox 1, the the focus goes to textbox 2, etc. Here is what I'm using...
If txtSerial.Text = "" Then
If txtSerial.Tag <> "Focused" Then
txtSerial.SetFocus
txtSerial.Tag = "Focused"
End If
End If
If txtSerial.Text <> "" Then
SerialOK = True
If UCase(Mid(txtSerial.Text, 1, 1)) = "S" Then
InLabel = "Star"
ElseIf Mid(txtSerial.Text, 1, 2) = "1S" Then
InLabel = "Delta"
Else
MsgBox "Invalid Scan. Please Scan Serial No.", vbInformation + vbOKOnly, "Invalid Scan"
txtSerial.Tag = ""
txtSerial.Text = ""
End If
If txtPartNum.Text = "" Then
For i = 1 To 30000
Next
txtPartNum.SetFocus
End If
End If
This routine sits in a timer with an interval of 1000. Is there a more effcient way to do a process like this?
Thanks.
Pete
If txtSerial.Text = "" Then
If txtSerial.Tag <> "Focused" Then
txtSerial.SetFocus
txtSerial.Tag = "Focused"
End If
End If
If txtSerial.Text <> "" Then
SerialOK = True
If UCase(Mid(txtSerial.Text, 1, 1)) = "S" Then
InLabel = "Star"
ElseIf Mid(txtSerial.Text, 1, 2) = "1S" Then
InLabel = "Delta"
Else
MsgBox "Invalid Scan. Please Scan Serial No.", vbInformation + vbOKOnly, "Invalid Scan"
txtSerial.Tag = ""
txtSerial.Text = ""
End If
If txtPartNum.Text = "" Then
For i = 1 To 30000
Next
txtPartNum.SetFocus
End If
End If
This routine sits in a timer with an interval of 1000. Is there a more effcient way to do a process like this?
Thanks.
Pete