I am using Visual Basic 6.0 and I created a macro in access 97 called tester.
By clicking on a cmd button how can I run this macro from my Visual Basic?
Printable View
I am using Visual Basic 6.0 and I created a macro in access 97 called tester.
By clicking on a cmd button how can I run this macro from my Visual Basic?
Look into using the Microsoft Access Object reference!
You'll be able to do it through that!
b :)
perhaps this will be helpfull.....
VB Code:
Set rAcc = CreateObject("Access.Application") rAcc.OpenCurrentDatabase (your_database_path) rAcc.DoCmd.OpenModule "Module1", "SetStartupProperties" rAcc.Run "SetStartupProperties"
Where "SetStartupProperties" is a Macro in Module1 of your Access database.
Don't forget to set reference to Access in your project.