Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    scheduled accecss procedures (W2k, Office 2k)

    Hello loungers
    I have a procedure in Access that fires a query and then runs up Outlook and sends a bunch of eMails.
    I was hoping to run a scheduled event with windows scheduler that ran up access, ran the query and the eMails.
    the vbs script follows, more or less from WOW
    ----------------------------
    Dim objAccess

    Dim strDBName

    Set objAccess = WScript.CreateObject("Access.Application")

    strDBName = "xathName:databaseName.mdb"

    objAccess.OpenCurrentDatabase strDBName
    objAccess.docmd.runMacro("sendAlerts")

    ----------------------------
    The macro sendAlerts runs the procedure which executes a query and fires outlook.

    My problem is that the windows installer runs and tries to update MSOffice .. ????
    THere may well be a bigger problem in that the approach is all wrong.

    Any thoughts from you folk would be appreciated

    Geof

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: scheduled accecss procedures (W2k, Office 2k)

    What happens if you start Access by itself? Do you get the installer too? What if you let it update Office?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    Re: scheduled accecss procedures (W2k, Office 2k)

    Hello Hans
    I let the update run and all is well.
    The scheduler runs perfectly, access fires and in turn fires outlook perfectly.
    I might explore running the code by means other than

    objAccess.docmd.runMacro("sendAlerts")

    but it works.

    Thanks for the interest

    Geof

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •