Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trap Barcode Number?

Status
Not open for further replies.

GNMN

Programmer
Oct 14, 2003
20
AP
Good day! Does anyone know how to trap the decoded figure sent by Barcode Scanner... pls help. Tnx.

Gene
 
could you clarify this further? perhaps a small detail of what you're trying to achieve will help. but as far as i know, barcode scanners do the translation for you so once a code is scanned, it act as if the characters have been entered thru keyboard. so there's really no trapping needed. [smile]

hope this helps. peace! [peace]

kilroy [trooper]
philippines

"Illegitimis non carborundum!"
 
As Kilroy says above, barcode readers include a decoder which will change the bar image into an ASCII character string.

Typically the barcode reader is attached to the workstation via a keyboard "wedge" which will send the characters to the workstation in a manner similar to user keyboard entry.

In that way the application will not be able to tell the difference between manually typed characters and a barcode string. And, consequently, the application will not need to be modified to accept this string.

There are a few exceptions to this such as large volume barcode readers such as conveyor belt readers, etc. But even these readers typically automatically decode the barcodes and send an ASCII character string to the application.

Your application will merely need to have barcode cross-reference value(s) saved somewhere (such as in a table) so that the application can "convert" the ASCII character string into some other value (such as an SKU).

You might also want to look at:
thread182-774537

Good Luck,
JRB-Bldr
 
Thanks for the tips. What I am trying to say is "how VFP handles the data, is it a memory variable?" Appreciate if you could send a sample code on how to handle this. Thanks.

Gene
 
VFP handles the data as if they were typed at the keyboard.

So if you have a input routine/form running at the moment of scanning the barcode the barcode gets entered into your input routine of form.
Notihing special to it.

Rob.

 
Rob, Kilroy & JRB-Bldr... thank you for all the informations. I think I need to start the process. Thanks a lot.

Gene
 
Rob is correct in that barcode reader data can be (and usually is) received into the application just like keyboard entry data - that is via a Textbox GET field within a Form.

Since that Textbox GET field has an associated ControlSource, that memory variable will acquire the value. Or you can assign the value to another variable within the TextBox's VALID method.

If you want your barcode reader to work in a different manner, such as un-attended automatic conveyor belt barcode reader value entry directly into a table, etc. you will need to get more creative. And probably use a different type of barcode reader.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top