Access Application with bar code scanner / printer

JimmyC
3StarLounger
Posts: 382
Joined: 08 Feb 2010, 16:08

Access Application with bar code scanner / printer

Post by JimmyC »

I have spent the last couple of hours "googling".....and haven't been successful.

I am looking for "how-to" instruction on how an Access database can interface with a bar code scanner and printer. I know these devices have Windows drivers, etc. but I need to learn "how" to interface the bar code scanner with an input screen in Access. We are currently using Access XP on WIn xp sp3. Has anyone developed an access database that can be updated by a bar code scanner? I guess I am at the "Access for Dummies" level as my starting point.

While this is somewhat off-topic, I am also seeking a first-hand recommendation of bar code printer / scanner combination. In all of my research, there seems to be a significant difference of opinion in the quality of various bar code hardware. Terminal printers, etc. Thank you.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access Application with bar code scanner / printer

Post by HansV »

Most bar code scanners act like a keyboard: when you scan a bar code, the (decoded) value will automatically be entered into whichever application has the focus. So if you have an Access form open, the value will be entered into the "active" text box.
If you want automatic processing, look for a scanner that can be programmed, for example to send an Enter or Tab after the scanned value, so that the focus automatically shifts to the next text box or record, ready for new input.

Hopefully others will have recommendations for brands and/or models.
Best wishes,
Hans

JimmyC
3StarLounger
Posts: 382
Joined: 08 Feb 2010, 16:08

Re: Access Application with bar code scanner / printer

Post by JimmyC »

Hans,
Always your advice is greatly appreciated...Thanks for the insight as to the programmable scanner...I wondered "how" Access or Excel would "know" when to move to the next field / cell without some sort of special scanner programming.

The application I am assigned to work on would need to use a portable scanner. Once all the scanning in the file room is complete, the scanner would be docked and the information transferred from the scanner to Access--which could be iterations through the same input screen to load the multiple files scanned into the access database.

Any one else with any experience in this area, please feel free to post...it will be welcome and I will be thankful for your information. JimC

User avatar
Carol W.
3StarLounger
Posts: 390
Joined: 26 Jan 2010, 16:02
Location: Las Vegas, NV

Re: Access Application with bar code scanner / printer

Post by Carol W. »

JimC,

I have no experience with a portable scanner as you describe the operation. However, I did write a restaurant application. One of the functions allows the user to swipe a credit card using a mag stripe reader. We set the Access form into which this occurs up so that the entire swipe goes into a single text box on the form. The mag stripe reader is set up to automatically insert a carriage return at the end of the data. Therefore, the focus goes to the next field. After the swipe is complete, we parse and validate the data in the Before Update event.

Not exactly the same but similar to your task. Hope this helps.
Carol W.

BigKev
StarLounger
Posts: 78
Joined: 10 Feb 2010, 12:54
Location: Jeddah, Saudi Arabia

Re: Access Application with bar code scanner / printer

Post by BigKev »

Two things come to mind.

You can use the TextChanged event of the input text box to move to the next field, or indeed do anything you want to, when the length of the data input (from the scanner) reaches a certain value.

When you say the portable scanner is docked, I assume there is some software that retrieves the data from the scanner. If this data ends up in a file somewhere (most docking systems place the data from the portable device into a file) then you can just read the data from the file.

Hope this helps.

Kevin Bell

User avatar
Carol W.
3StarLounger
Posts: 390
Joined: 26 Jan 2010, 16:02
Location: Las Vegas, NV

Re: Access Application with bar code scanner / printer

Post by Carol W. »

One more thing I neglected to mention which may (or may not) be relevant ...

Our user wanted his staff to use the keyboard only - no mouse (it's a long story)! So we changed the keyboard settings in Access to "Don't move" in the "Move After Enter" area and then used VBA code in the KeyPress event to detect when the enter key was pressed.

See attached screenshot.
keyboard settings.jpg
The entire app runs as if it was a DOS application!
You do not have the required permissions to view the files attached to this post.
Carol W.

Mark L
3StarLounger
Posts: 331
Joined: 11 Feb 2010, 03:55
Location: Land O Lakes, FL

Re: Access Application with bar code scanner / printer

Post by Mark L »

As Hans said, it is pretty easy to interface a scanner. Most are the "wedge" scanners, so named because they are "wedged" between the keyboard and PC; the PC treats the input from the scanner just like the entry was being made from the keyboard. Most scanners allow you to optionally select to add a carriage return or tab key to the scan, so Access can move to the next control.

Printing is a bit more complicated. The easiest way is to find a free barcode font; you can easily find such font on the internet, usually 3 of 9. You will have to know how to format your data so the font can accurately be rendered; for example, the 3 of 9 requires a leading and trailing "*" character. There are also some 3rd party ActiveX controls that can be used, for better font rendering. You can use any printer. There are some specialty label printers, which are convenient in that they are narrow and use paper rolls.
Mark Liquorman
Land O Lakes, FL
see my website http://www.liquorman.net for Access Tips and Tricks, and for my Liquorman Utilities.