How do I use MSCOMM to read data from a COM port in Access 2007?

Posted on 2009-05-01
Last Modified: 2013-12-05
I am developing an Access 2007 "project" (.adp) as a front-end to a SQL Server 2005 Express database.

In some of my Access Forms I want to read data sent from a barcode scanner attached to a COM port. I am fairly familiar with the barcode scanner side of things because this is an upgrade of an old DOS application that has been using various scanners for many years.

From what I have found so far on the web, MSCCOMM appears to be the suggested method of doing this. What I'm not so sure about is how I go about getting this installed and operational. Can anyone advise me on how to do this or point me to a relevant article? How do I get MSCOMM installed on my PC and how do I make Access 2007 aware of it so that I can use it in the VBA code behind my Forms?

Many thanks. Colin.
Question by:colinasad
    LVL 65

    Accepted Solution

    I dont know if its part of windows or not, as my lappy as other sdk on.

    Look for mscomm32

    if you go into vba editor then go into tools and references, is there Microsoft Comm Control listed? if not then if you hit the add or browse button, whichever one it is, see if you can find in windows directory\system32 for the file mscomm32
    if so select it

    With regards to using it, the reference added should allow you to define a type of MSCommLib.MSComm.
    LVL 65

    Expert Comment

    the suffix for this is .ocx

    I found this old post with regards to using it. It may help you.


    Author Comment

    Thanks for your prompt comments.

    I had been in my VBA Tools - References area but there was no mention of MSCOMM in the offered list of "Available references".
    I have now tried to "browse" in "C:\Windows\System 32\" as suggested but cannot find an "MSCOMM.OCX" entry there.
    Presumably if I can find a download on the internet and can install it, it should eventually appear there (???).
    I will give it a try and get back to you.
    LVL 65

    Expert Comment

    Possibly. I dont know the design licence usage for it. Maybe it is part of vb as I have visual studio. Not sure if it is part of vbruntime.
    If you do find it, you will need to register it (regsvr32) and hopefully it will let you use it.

    Author Closing Comment

    Thanks rockiroads.
    Managed to find and download mscomm32.ocx get VBA editor to reference it and create an "MSComm" control on an Access Form.
    All I have to do now is make it work for my barcode scanner.
    Thanks for your help so far.
    LVL 65

    Expert Comment

    Cool, good luck with getting it to work with the barcode scanner. Search EE as Im sure this type of question has been asked before,

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    732 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

    22 Experts available now in Live!

    Get 1:1 Help Now