?
Solved

Run Access Macro from ASP Page?

Posted on 2001-08-05
2
Medium Priority
?
566 Views
Last Modified: 2012-08-14
I am creating new web based user interface for MS Access database. Some of the old maintenance procedures are stored as MS Access Macros. Is there any method to do it (execute) inside ASP page?

I found something which is working on PWS, but I am not sure about this solution.

<%
Dim acS
Dim acCmd
Set acS   = CreateObject ("access.Application")
acS.OpenCurrentDatabase "D:\www\Inetpub\scripts\asp.mdb"
Set acCmd = acS.DoCmd
acCmd.RunMacro "TestMacro"
%>
0
Comment
Question by:ppy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6355662
Does this macro require any user intervention? If it does, I wouldn't even attempt to run it (even if you can) unless somebody is at the server to respond.
0
 
LVL 11

Accepted Solution

by:
jekl2000 earned 300 total points
ID: 6356211
This works for me, runs everyday (using Access 97)
Visible can be true or false depending on rather you want to see access start or not. On IIS you also have to set the "Allow out of process components" to yes  in order to run access,,or excel etc.



<% Dim objAcc
Set objAcc=Server.CreateObject("Access.Application")
objAcc.Visible=true  'or false'
objACC.OpenCurrentDatabase "d:\webdb\steelers.mdb"
objAcc.DoCmd.RunMacro "Macroname"
objAcc.CloseCurrentDatabase
Set objAcc=Nothing%>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question