MS Access Batch file in job agent hanging

  • I have a batch file which kicks off a macro in an Access db using the command line with option /x [macro name]. It works fine when I run in manually, but hangs ups the job agent and never completes. This I know because the macro is running a shell command to send an email which never happens.

    I have made sure that the owner has the proper rights to use the agent.

    Any ideas?

    Laura

  • Maybe there a message box popping up. Since there is no GUI interface, there is no way to respond to it, and it would just wait until you kill it.

  • I see what you are saying, but wouldnt I still get the message box during the manual run of the same batch file? It works just fine when I run it that way.

  • I think this is MS Office security related. I think you're getting an MS Office pop up window saying something to the effect of "Someone is trying to run Access on your behalf, do you want to allow it?" So no, you don't get the pop up when you run it manually.

    Run your Access /x option from Windows Task Scheduler. Make sure the last step in the macro is to close Access.

Viewing 4 posts - 1 through 3 (of 3 total)

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