Creating an Access 'listener'?

HairyArse

Registered User.
Local time
Today, 05:12
Joined
Mar 31, 2005
Messages
92
Hello guys.

I've got an idea for something I'm trying to implement that I suspect is actually impossible to do in Access, but thought I'd see if any of you guys knew of a way before I dismiss it.

I'm developing an Access database that handles my company's orders, purchases, quotation and deliveries etc. I've incorporated barcodes in order to quickly enter IDs and reference numbers but I'm also now starting to play about with creating custom commands and functions that can also be triggered by scanning a barcode.

I've got this working just great if you have the correct form open and the correct field has focus. You scan the code and it breaks it down into three chunks, the section of the DB, the command you want to apply and the record against which you want to run the command. Switch/Case is then used to apply the commands.

What I want to do however, is implement a system whereby a certain barcode can be scanned and it doesn't matter which form/field you have open/selected. I'm guessing I need to create some sort of 'listener' that runs silently in the background and detects when a specific string is entered.

Now the only way I can see to get this to work is to create a function and apply it to every single element on every single form, but this is inelegant and far from practical/feasible.

So does anyone know of a way to incorporate the above?
 
what happens to a barcode when it gets scanned with a scanner?

where does the barcode go?


I mean outside access
 
It stays within Access and doesn't go anywhere.

Take this typical example:

1) DLA-PRN

2) 12345

I would scan a barcode with the letters DLA-PRN. My function (already working) splits that into two parts. DLA designates Delivery Address and PRN designates PRN. So in this instance I want to print a delivery address label against an sales order. One the DLA-PRN has been processed and recognised, the sytem would then prompt the user for a Sales Order ID which could be typed in, or scanned from the Order itself.

I have got this working already for a single form, but it only works if the form is open and the barcode entry field is select/has focus.

I want this system to be able to work no matter where the user is within my database.
 
I should also add that for now I'm only using locally connected barcode scanners and not wireless detached readers that have to be synchronised later on.
 
If you could configure your scanner to send some special character(s) before the barcode, and then define a shortcutkey in access with same characters, then I guess you'd get what you want.
 
Hi,

here is a crude thought! why not have a hidden form that receives every barcode. this way it would look like any form can receive a barcode zap. Set up a condition checks the barcode and direct to the required form from there.

the hidden form would simply look at the barcode, choose the condition and open the form needed.

simple lol


cheers


nigel
 

Users who are viewing this thread

Back
Top Bottom