When the DB is onpen Its Locked

  • Thread starter Thread starter Moshe Plotkin
  • Start date Start date
M

Moshe Plotkin

B"H

If I have a DB open then no other program can access it.
Any way to open a DB without locking it?

Moshe Plotkin
 
B"H

The Other User is ME
Through the DataBase I open a word Document and try to merge it with the DB
I am curently using and it sais its locked.

Thanks, We're getting somewhere
 
Try opening your database in "shared" mode. It is possible that you open
the database in the UI (User 1) and then your code, MailMerge???, (User 2)
tries to open the database for MailMerge DataSource but the "User 1" already
locked it exclusively.
 
B"H

OK great how do I open a DB on shared mode?
and BTW its the same user.

Thanks,
Moshe Plotkin
 
B"H

The Db is set to open in shared mode, in the properties (under the tools
menu)

I checked this after I posted, so I still need an answer
 
Like I wrote, it may be one user physically but to the JET engine the Access
UI is ONE user and the VBA code can be ANOTHER user.
 
1. Do you have create / Read / Write / Delete on the Folder where the MDB
file is in?

2. Try:
Close Access completely / Check the directory where the MDB file is in and
see if you find the file <yourdatabase>.LDB / Delete the LDB file if it
exists and then try opening the database again.

3. The database may be set to open in "shared" mode but you might have
opened it in "Exclusive" mode previously and if you use the MRU, IIRC, you
will open the database in the same mode as you last opened it and it could
be "Exclusive" mode.

Try:
Open Access software by itself / Use the Menu File / Open ... / Use the
Dialog to navigate to your MDB file. Click the DownArrow next to the "Open
???" button. Select just "Open" while you are holding the Shift Key down.

Don't know what else can be wrong if the above doesn't work.
 
B"H

Thanks for all your help
Got it working.



Van T. Dinh said:
1. Do you have create / Read / Write / Delete on the Folder where the MDB
file is in?

2. Try:
Close Access completely / Check the directory where the MDB file is in and
see if you find the file <yourdatabase>.LDB / Delete the LDB file if it
exists and then try opening the database again.

3. The database may be set to open in "shared" mode but you might have
opened it in "Exclusive" mode previously and if you use the MRU, IIRC, you
will open the database in the same mode as you last opened it and it could
be "Exclusive" mode.

Try:
Open Access software by itself / Use the Menu File / Open ... / Use the
Dialog to navigate to your MDB file. Click the DownArrow next to the "Open
???" button. Select just "Open" while you are holding the Shift Key down.

Don't know what else can be wrong if the above doesn't work.
 
Back
Top