sbornstein2
asked on
Executing Access Macro in Visual Basic 6.0
I have code where I dont reference access in my project itself. Can I execute a macro using the folliowing code? I dont see the DoCmd options under my properties. I would rather just use something similar to what I have and not reference access. Here is what I use now:
Set wsAccessWs = DBEngine.Workspaces(0)
Set dbAccessDb = wsAccessWs.OpenDatabase(Ap p.Path & gsDBName, False, False)
the dbAccessDb has .execute and then a query name. But I dont see anything for executing a macro. Thanks all.
Set wsAccessWs = DBEngine.Workspaces(0)
Set dbAccessDb = wsAccessWs.OpenDatabase(Ap
the dbAccessDb has .execute and then a query name. But I dont see anything for executing a macro. Thanks all.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use automation to instantiate an MSAccess object. That will then allow you to invoke the .DoCMD method of the object to run the macro.