Link to home
Start Free TrialLog in
Avatar of jackg
jackg

asked on

Barcode reader

I am using a keyboard wedge barcode reader but am experiencing difficulty in displaying errors. If I use the barcode scanner it skips the first error message and displays the second.  If I use the keyboard to input the barcode it displays the first error message. Any ideas why?
Avatar of rspahitz
rspahitz
Flag of United States of America image

My guess is that the scanner is passing and extra "newline" character.  The way to find out is to intercept and display every character passed in:

Private sub txtBarcodeInputField_KeyPress(KeyAscii As Integer)
  dim i as integer
  for i=1 to len(KeyAscii)
    debug.print mid$(KeyAscii,i,1)
  next i
end sub

Run the same test and see what the last few characters are.  If they're 13 and 10, you're getting a carriage return and line feed at the end, which may not have been expected.
Avatar of jackg
jackg

ASKER

Thanks rspahitz, but I resolved the issue by using a doevents before the error message so I am now closing the question.
OK...CS can delete this question for you.
OK...CS can delete this question for you.
Avatar of DanRollins
jackg, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial