S
Stewart Berman
Access 2007
I have code that creates a second instance of Access and uses it to open another database as its
CurrentDB:
Set mappAccess = New Access.Application
mappAccess.OpenCurrentDatabase strPathDBName, False, strPassword
If the OpenCurrenDatabase method fails (i.e. the strMDBPath is locked because it is already opened
in exclusive mode) it does not throw an error. It just doesn't open the database.
If I open Access and manually try to open a database that is locked Access throws an error saying it
can't open it.
Why doesn't the OpenCurrentDatabase method throw an error? Is this by design?
I have code that creates a second instance of Access and uses it to open another database as its
CurrentDB:
Set mappAccess = New Access.Application
mappAccess.OpenCurrentDatabase strPathDBName, False, strPassword
If the OpenCurrenDatabase method fails (i.e. the strMDBPath is locked because it is already opened
in exclusive mode) it does not throw an error. It just doesn't open the database.
If I open Access and manually try to open a database that is locked Access throws an error saying it
can't open it.
Why doesn't the OpenCurrentDatabase method throw an error? Is this by design?