none
Scheduled Task Issues with Access Database RRS feed

  • Question

  • I'm hoping someone can point me in the right direction here...

    I'm running Access 2007, and I have a database set up that has a startup form...the form has code that runs in the Load event that runs some queries, launches Outlook, sends an email, and then closes Outlook and the Access db...

    This all works fine when I launch the database either through Access, or just by double-clicking it from Explorer -- I see the database open, I can see when Outlook starts, and then everything closes properly...

    However, I setup a scheduled task that launches Access and points to that database...I can see the database open and I can see Outlook start, but nothing happens at that point...

    I tried to do the same thing in a CMD file with just one line that starts the Access database, but I'm seeing the same results -- Access opens, then Outlook starts, but nothing happens from there...

    If someone can point me in the right direction or tell me what I'm doing wrong here, that would be greatly appreciated...thank you in advance for reading...


    • Edited by Rob Hurwitz Friday, January 16, 2015 1:37 AM
    • Moved by Cloud_TS Monday, January 19, 2015 5:59 AM move to appropriate forum
    Friday, January 16, 2015 1:31 AM

Answers

  • Hi Rob hurwitz,

    Base on the description, there are some issues when you were using the Scheduled Task runing the Office automation.

    As far as I know, the Office automation doesn't support in server side enviroemnt. Here is the statement for this topic:
    All current versions of Microsoft Office were designed, tested, and configured to run as end-user products on a client workstation. They assume an interactive desktop and user profile. They do not provide the level of reentrancy or security that is necessary to meet the needs of server-side components that are designed to run unattended.

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.(Considerations for server-side Automation of Office)

    I am not familare with Schedule a task, are you using it in an server side enviroment?

    >>I tried to do the same thing in a CMD file with just one line that starts the Access database<<

    Would you mind sharing the code you start the Access?

    In addtion, I suggest that you try to insert Debug.Print method into the code to track which of line stops.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, January 19, 2015 9:16 AM
    Moderator