Executing an Access Db from a SQL Job

  • I've just been handed off a couple MS Access mdb's that upon double clicking each, it executes several macros, queries, exports an email, which is great because it's all automated. The one piece that is still manual is the actual double click that is required by a human hand that I would like to have automated, maybe thru a SQL job that can run on a schedule, but I'm not sure if this is possible. Does anyone know if it is, or, if there's another way to accomplish this?

    Appreciated,

    J.

  • If you add /x:Macroname to the end of the execution path, then when the database opens it will call the macro Macroname, so you could have something like

    DoCmd.RunSQL...

    Application.Quit

    inside your macro and Access would close the database and quit when the macro is finished running.

    Here is a MS article on the subject.

    Forgot... if you name the macro AutoExec, it will execute every time the database opens.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply