Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Access Macros from ASP

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
US
I have an Access database with many forms, macros etc. It's purpose is to automate the creation of mail merge files by letting users pick names of recipients from the table and send the data to a mertge file.

I have been asked to make this database available online. In other words, I need to have all the functions of the database replicated on the web (yet still use the Access database).

Is there a reliable way to run Access macros from ASP? I've tried various suggestions like the following:

Set objAccess = Server.CreateObject("Access.Application")
objAccess.Visible = False
objAccess.OpenCurrentDatabase Server.MapPath(testdb.mdb)
Set objDB = objAccess.CurrentDb()
objDB.DoCmd.RunMacro macro1


When I execute this code (from a command button)nothing hapens. Not even an error message.

Does anyone have any suggestions?

 
I don't see how you can use the Access front end forms macros etc via ASP, as ASP is a server side script and it delivers HTML to a browser, you could certainly use back end part, ie tables etc, but I believe you will have to write your own ASP front end.
 
You can use all Acess features if you can create the Acess aplication object and if you have rights to modify/change the file.
Try to make some simple macros(Update, Insert) that you can easyly check after.
Also i thik you save and close your database.

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top