I working on MS Access application to store customers data. All data are stored in SQL DB. One of input field is used to store ID number of card with magnetic strip. Instead of typing long number I purchased usb magnetic scannert. Scanner works but after I scan card it giving me card number with not wanted char on front and back of string, example #1234567890123456789012345-1-1-1#. How can I get rid of additional char, leaving only 25 characters between 2nd and 26th char.
Asked
Active
Viewed 30 times
1 Answers
1
You can use
strData = Mid(strData,2,25)
after reading the data.
Also I would recommend to create a procedure for recognizing of scanner input. Use Form_KeyPress
form event and start buffering symbols when first received symbol is #
until you receive last character. After this you can set focus to scanner input field and display only required characters from received string. In this case you can scan the data independent of current focus and show to the user only meaning characters. I can provide example for regular laser scanner with AIM service codes (3 service characters at the begining)

Sergey S.
- 6,296
- 1
- 14
- 29