MS Access running a macro (scheduled task) without user intervention.

Posted on 2009-02-09
Last Modified: 2012-05-06

=================================== importcomputers.bat
"E:\Program Files\Microsoft Office\OFFICE11\msaccess.exe" "e:\test\mydb_test.mdb" /x Nightly

The above is a script that runs a macro called Nightly.

It works fine but with only one problem.

When it fires as a scheduled task, it opens up msaccess and prompts me with a macro security warning.

Instead of this, id like the task to run silently so that i dont have any prompting whatsoever, and it opens msaccess, runs the macro etc without any intervention.

Any help greatly appreciated.
Question by:Simon336697
    LVL 119

    Assisted Solution

    by:Rey Obrero
    from access window
    tools > macro>security
    set the security to Low
    LVL 18

    Assisted Solution

    Set the macro security to low
    LVL 1

    Author Comment

    Hi capricorn thank you mate.
    This does PART of what im looking for by bypassing the prompt you get for macro security.
    But it still opens up access and runs the macro visually.
    I want this to be done silently.

    Really appreciate your help.
    LVL 28

    Accepted Solution

    Rather than running as a BAT file you need to run the command directly from the Task Scheduler, this way you have the option of running it as Hidden.
    Cheers, Andrew

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    755 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