Batch File running Access Macro/function

Posted on 2006-05-01
Last Modified: 2008-02-01
Hi all--

I have a batch file I'd like to schedule that runs a macro in an access application.  The macro in turn calls a function which exports some task information from the local instance of outlook.  My .bat is pretty simple:

"C:\Program Files\Microsoft Office\Office11\msaccess" "C:\SP\SPlans.mdb" /x TaskImpy

It seems to work just fine...appropriate records are written to the access table.  However, the cmd window remains open.  Am I missing something?  I'd like to figure out how to close the access app via the batch file as well, but I can seem to get to that step...

Question by:rz1224
    LVL 77

    Accepted Solution

    Hi rz1224,
    You put a Quit action as the last step in the macro.


    Author Comment


    DOh!  Thanks for  your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    761 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

    11 Experts available now in Live!

    Get 1:1 Help Now