Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: Error to run Macro

    <%
    DbPath = "../MS Access DB/db1.mdb"
    Set objAccess = Server.CreateObject("Access.Application")
    objAccess.Visible = False
    objAccess.OpenCurrentDatabase Server.MapPath(DbPath)
    Set objDB = objAccess.CurrentDb()

    macroName = "Macro1"

    objAccess.DoCmd.RunMacro macroName


    set objDB = nothing
    objAccess.Quit acQuitSaveNone
    Set objAccess = Nothing

    Response.Write "Your macro has been run!"
    %>


    There is error message:
    Error Type:
    (0x800A1EBA)
    /asp_db1/runmacro.asp, line 7
    this line code has error
    objAccess.OpenCurrentDatabase Server.MapPath(DbPath)


    What's wrong with it?
    Thanks.

  2. #2
    Join Date
    Jan 2005
    Posts
    362
    Do you have permissions to read the file?
    I found an older thread

Posting Permissions

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