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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Access macro from vbscript

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I need to open an access database and run some code which, in turn, prints a report.

I've searched the net for examples and many of them indicate the following code works. But when I run the script I get the error: ActiveX component can't create object: 'Access.application'

How do I resolve this issue?

Code:
set objaccess = createobject("Access.application") 
objaccess.opencurrentdatabase ("E:\dev\db4.mdb") 
objaccess.run "macro1" 
objaccess.CloseCurrentDatabase 
set objaccess=nothing
 
That could be the problem (more then one version). Am extremely busy right now, but will give your idea a try when time permits.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top