There are a number of different ways to do what you want to do that
depend on a number of factors.
Firstly, it will depend on how you want things to work.
Most bar code readers are available with one of two output options.
The first option is called "Keyboard Wedge" output where you unplug
your keyboard, plug the bar code reader into the keyboard port on your
PC and then plug your keyboard into the bar code reader. This
arrangement makes the bar code reader appear as it it were simply a
second keyboard. Your original keyboard continues to work as normal
however when you read a bar code, the data encoded in the bar code
appears to any application running on your PC as if it were typed in.
To use a keyboard wedge type of bar code scanner for your application,
you would need to create a form in Access where you would normally
type in the data contained in the bar codes. You would then have code
associated with the "Enter" key press for the textbox in the form that
is receiving the bar code numbers so that when the Enter key is
pressed, you would take the bar code number that was just entered, do
a lookup in a table to find the data record that contains the
corresponding item record and then update the quantity field in the
record.
The keyboard wedge interface is extremely simple however it has a few
drawbacks. If you swipe a bar code, the cursor has to be in the
correct input field in the correct application otherwise you end up
reading bar code data into whatever application has the focus. This
can cause all sorts of potential problems as you can imagine.
The other possible output option is to get a bar code reader with an
RS232 or "Serial" interface. With these types of bar code readers, you
connect the reader to an available serial port on the back of your PC.
You would then need to use a program called a "Software Wedge" to take
the data from the bar code reader and feed it to your application. The
disadvantage to this approach is that it is a little more complex
however you gain much more control over how and where your data ends
up when you read a bar code. With a Software Wedge, you can control
exactly where the data goes in the target application and can even
trigger events in your application that would run code to take the
data in directly from the scanner and perform the update to the
quantity field in the database. This approach does not require that
your application hav a special form open for data input or even have
the focus. In other words, it is a more robust way of doing things.
TAL Tehchnologies sells a product called WinWedge which is a Software
Wedge for Windows. Visit:
http://www.taltech.com for more information.
This web site is also an extremely good place to obtain information
about bar coding in general.