Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

Barcode scanner and textboxes

Hello.

We are replacing the old barcode scanners we have with a new wireless model. The old scanners would automatically add a CR after the scan and I used this to move between field that were being scanned for a validation check on the chemicals being used. Well the new scanner doesn't do this at all, it reads the barcode fine and just sits there waiting after that.

I had been using the 'leave' event on the textboxes to fire a DB lookup and validate everything, and the trick here is to be able to do this completely hands-free with the scanner. So when the user scans the 1st barcode the leave event would fire and then I would shift the focus to the next field, call the DB lookup and everything was rosy.

Now I did try using the text_changed event, but that won't work because the input from the scanner is coming in like you are typing and after the first char it's moving on and the entire barcode isn't input into the textbox.

So at this point I'm looking for suggestions on how I could either wait out the end of the string coming into the textbox, or something along those lines so I can get the entire barcode input, then move on over to the next textbox automatically without the user needing to use anything else but the barcode scanner.

Thanks!
0
ApexCo
Asked:
ApexCo
1 Solution
 
ptakjaCommented:
Are you sure the scanner can't append some characters? What brand scanner is it? We use Symbol scanners where I work. Both wired & wireless. They all are programmable (the wired models by scanning a configuration barcode) so do exactly what you are talking about (append CR/LF chars to the end of each scan).

Do you have the ability to modify the bar codes that you are reading?
0
 
YurichCommented:
agree with ptakja. these settings normally are disabled by default, but if you look though the manual of your scanner, you would most likely find how to set up your scanner append a character or even perform some operations (move to the next field, simulate press-enter, etc).

good luck,
yurich
0
 
ApexCoAuthor Commented:
Thanks for the idea and that worked out well. My first time programming a barcode scanner, I had no idea you could make them do so much.

Appreciate the responses.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now