Opening another DB from a DB

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?
 
N

nathan_savidge

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top