If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Error to run Macro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-06, 16:41
accessman2 accessman2 is offline
Registered User
 
Join Date: Sep 2005
Posts: 313
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****nMacro 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.
Reply With Quote
  #2 (permalink)  
Old 07-15-06, 16:57
dimis2500 dimis2500 is offline
Registered User
 
Join Date: Jan 2005
Posts: 362
Do you have permissions to read the file?
I found an older thread
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On