Solved

Run Access Macro from ASP Page?

Posted on 2001-08-05
2
493 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
2 Comments
 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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 100 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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 video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now