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

    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:
    /asp_db1/runmacro.asp, line 7
    this line code has error
    objAccess.OpenCurrentDatabase Server.MapPath(DbPath)

    What's wrong with it?

  2. #2
    Join Date
    Jan 2005
    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