R
Rodrigo
How to I stop the autoexec macro from running when openning a database
trough automation?
Private Function OpenThisDB()
On Error Resume Next
Dim oAcc As Access.Application
Dim oDB As Database
Set oAcc = New Access.Application
Set oDB = oAcc.DBEngine.OpenDatabase("c:\tmp.mdb", False, False)
oAcc.OpenCurrentDatabase "c:\tmp.mdb", False
' how to avoid the AutoExec macro
' and the form in on the database startup properties
' from start running here
oAcc.CloseCurrentDatabase
Set oDB = Nothing
Set oAcc = Nothing
End Function
Thanks,
Rodrigo.
trough automation?
Private Function OpenThisDB()
On Error Resume Next
Dim oAcc As Access.Application
Dim oDB As Database
Set oAcc = New Access.Application
Set oDB = oAcc.DBEngine.OpenDatabase("c:\tmp.mdb", False, False)
oAcc.OpenCurrentDatabase "c:\tmp.mdb", False
' how to avoid the AutoExec macro
' and the form in on the database startup properties
' from start running here
oAcc.CloseCurrentDatabase
Set oDB = Nothing
Set oAcc = Nothing
End Function
Thanks,
Rodrigo.