barcode scanner only for access

YouMust

Registered User.
Local time
Today, 09:31
Joined
May 4, 2016
Messages
106
Howdy I'm not sure if this is even possible so thought I'd ask before trying and buying a barcode reader.

we need a barcode scanner to enter serial numbers in access but a piece of software doesn't play nice and takes every scan as keyboard inputs even when its minimized.

Is there a way to force the scans to only go to access?
 
As far as I'm aware that's how barcode scanners work. Basically as a keyboard.

Sent from my SM-G925F using Tapatalk
 
I suspect you are not using the "set focus" method. If you tell Access you want the focus set on the serial control, the scanner has little choice but to scan into that field.

The scanner cannot wake Access up if you are surfing the web.:p
 
Connect the device to the computer. Now look in device manager and get the device's true name. In MS-DOS, names were like COM1, COM2, etc. and you could do an

Code:
OPEN "COM2:" FOR INPUT AS FILE #1

but this device's connection method might cause it to have a different name. For instance, USB device names can be interesting. In any event, the concept is still the same.

Then, in VBA, when you are ready to use this puppy, OPEN the device as though it were a file. You will have to then use a VBA "READ" to poll the device for each input. Note that opening in this mode is SYNCHRONOUS in that if Access isn't reading, the device will hang and not be ready for a second read. The only way to keep other interceptions from happening is to keep the device OPEN as described, which means that even if minimized, Access is still running in the background.

If you buy such a reader, be sure to read up in its user manual on how it presents records, since you might need to use one of the variants of the OPEN verb based on whether the device presents an entry followed by a valid record delimiter.

Using OPEN and READ verbs, you will essentially prevent Windows from intercepting anything. Look into the "Access Read" and "Lock Read" OPEN options to assure no vexing interceptions by other programs or Windows itself.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom