Opening another DB from a DB

  • Thread starter Thread starter nathan_savidge
  • Start date Start date
N

nathan_savidge

Hi,

I have created a DB. However over the first few weeks of the database being
live. I wish to do a few tweaks. I have created a version control DB that
checks that there is not a more current DB present. If there is, the DB
(version control) copies over the new version of the front end, and then the
version control DB should open it.

I am using the following code :

Set objAccess = CreateObject("Access.Application")
objAccess.Visible = True
objAccess.Application.OpenCurrentDatabase (strPath & Environ("UserName") &
"\RO_Tracker_Front_End.mdb")
DoEvents

I keep on getting the error :

Microsoft Office Access can't open the database because it is missing, or
opened exclusively by another user.


No one is in the DB, it has just been copied over.

Can anyone advise?
 
I have fixed it now, for anyone else who is interested:

i needed to give the object user control,

objAccess.Visible = True
objAccess.UserControl = True
objAccess.OpenCurrentDatabase (strPath & Environ("UserName") &
"\RO_Tracker_Front_End.mdb")
DoEvents

Thanks
 
Back
Top