Is it possible to execute code in an Access module from a VB front-end?
(Please let it be YES!)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Printable View
Is it possible to execute code in an Access module from a VB front-end?
(Please let it be YES!)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Add reference to Microsoft Access 8/9 Object library
This executes a sub in an MS Access module:
Be sure your method (in the Access module) is declared as PUBLIC
HTHCode:'declare objects
Dim axs As Access.Application
Set axs = New Access.Application
'open database
axs.OpenCurrentDatabase "C:\Nwind2k.mdb"
'call PUBLIC helloworld subroutine
axs.Run "HelloWorld"
'release object
axs.CloseCurrentDatabase
Set axs = Nothing
Tom
I've done it in Excel, I'd expect the anser to be yes for Access.