how to use a USB Barcode Scanner with MS Access 2007

Posted on 2011-10-13
Last Modified: 2012-05-12
I have an Acess 2007 database setup as a POS application. I want to add a scanner for sales and stock functions. I would prefer not to use a keyboard wedge interface as it will accept scans at anytime possipbly spraying keystrokes all over the place. There are lots of USB scanners available but I don't know how to interface to it using VBA in Access.

Does anyone know how this would work? Is there a standard software interface for USB scanners or will it vary from device to device? Would it trigger a form event?
Question by:rgss
    LVL 8

    Expert Comment

    LVL 84

    Accepted Solution

    Have you selected a barcode scanner to use? Most of them will come with instructions for integrating with various platforms, and while many of them won't specifically mention Access, most of the time their VB6 code will work.

    You'll almost certainly have to go through their API or SDK to work with this, unless they've provided you with an activex control to work with (and even then, ActiveX controls designed for use with other COM-compliant platforms may misbehave in Access).

    In most cases, your application would either (a) include a reference to their API/SDK, which could then be used to work with your data and forms, or (b) an ActiveX control, which would provide you with the same basic functionality. In essence, the API/SDK or ActiveX control would communicate with the scanner, and then "report" back to you the results of that communication, generally by raising events (for example, the API might have a "ScanCompleted" event, which would be triggered when a valid barcode was scanned). Your code would then react to that ScanCompleted event, and would take action based on that.

    I'm not sure how the links from hello_everybody would help, as they're just links to the idautomation site for their barcode fonts, not scanners, and the dbforums link is for a keyboard-wedge device, which you said you didn't want to use.
    LVL 1

    Assisted Solution

    The USB barcode scanners I've worked with just act as alternate keyboards.  Put the cursor in the text box you want to populate and instead of typeing the data in using the keyboard, scan it in using the scanner.  It works in any application.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now