G
Guest
I have to fire a module that is located in an unopened database when a
certain event/criteria is met in a front-end database that the user
initiates. I cannot seem to get the following to recognize the module!
Dim appAccess As Access.Application
' Create instance of Access Application object.
Set appAccess = CreateObject("Access.Application")
' Open WizCode database in Microsoft Access window.
appAccess.OpenCurrentDatabase "S:\CDT\Sandy\ShutdownTest.mdb", False
' Run Sub procedure.
appAccess.Run "TrackLogins", "LoginTableUpdate"
'appAccess.CloseCurrentDatabase "S:\CDT\Sandy\ShutdownTest.mdb", False
Set appAccess = Nothing
This line: appAccess.Run "TrackLogins", "LoginTableUpdate"
is the name of the procedure (set in the properties of the procedure) and
the LoginTableUpdate is the name of the Sub.
Please advise on the syntax - Also, I do not want to actually have the
database OPEN, I just want to create an ADO connection to it and run the
module from the front end database. It seems my code is still opening the
database.
Thanks for your advise,
certain event/criteria is met in a front-end database that the user
initiates. I cannot seem to get the following to recognize the module!
Dim appAccess As Access.Application
' Create instance of Access Application object.
Set appAccess = CreateObject("Access.Application")
' Open WizCode database in Microsoft Access window.
appAccess.OpenCurrentDatabase "S:\CDT\Sandy\ShutdownTest.mdb", False
' Run Sub procedure.
appAccess.Run "TrackLogins", "LoginTableUpdate"
'appAccess.CloseCurrentDatabase "S:\CDT\Sandy\ShutdownTest.mdb", False
Set appAccess = Nothing
This line: appAccess.Run "TrackLogins", "LoginTableUpdate"
is the name of the procedure (set in the properties of the procedure) and
the LoginTableUpdate is the name of the Sub.
Please advise on the syntax - Also, I do not want to actually have the
database OPEN, I just want to create an ADO connection to it and run the
module from the front end database. It seems my code is still opening the
database.
Thanks for your advise,