Click to See Complete Forum and Search --> : Running Access Module code
Mark Sreeves
Jan 31st, 2000, 04:00 PM
Is it possible to execute code in an Access module from a VB front-end?
(Please let it be YES!)
------------------
Mark Sreeves
Analyst Programmer
Mark.Sreeves@Softlab.co.uk
A BMW Group Company
Clunietp
Feb 1st, 2000, 11:30 AM
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
'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
HTH
Tom
JHausmann
Feb 1st, 2000, 11:50 AM
I've done it in Excel, I'd expect the anser to be yes for Access.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.