Solved

Run Access Macro from ASP Page?

Posted on 2001-08-05
2
527 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
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 100 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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