Hiya,
Anybody know how to do this please? I am opening Access from VB using
the code below. However, I don't want Access to close when objAccess
goes out of scope. I would like Access to remain open - like MS Excel
does if you write similar code.
I am trying to avoid using the Shell function because I don't want to
have to search for MSAccess.exe first.
If you step through the code and click on the Access session before
continuing through the VB code, it seems to know that you have
interacted with it and leaves Access open. I have tried throwing in an
AppActivate "MsAccess" to simulate this but it still closes Access as
soon as the VB code stops running.
I'm testing with VB6 and Access 97.
Thanks.
If chkOpen Then
On Error Resume Next
Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase (strFilename)
End If