Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening the same file twice on the same computer.

Status
Not open for further replies.

cimoli

Technical User
Jul 30, 2010
207
0
0
US
Just found a worker opening the Access file up twice on his computer. Then he searches for records in each.
I assume that this is bad. He crashed us today.

Is there anyway to prevent the person from loading up the same file (let's call it Jones.accdb) on his computer?
 
What about creating a shortcut and teach him to open by double-click it? Access has no built-in feature that prevents from creating new access instance and via File>Open get access to already opened database. API based solution can be applied to block such case

combo
 
>Access has no built-in feature that prevents from creating new access instance and via File>Open get access to already opened database

Not quite true.

File > Options > Client Settings > Advanced > Default Open Mode

Normally this is set to shared, but you can set it to exclusive.
 
I am assuming he is opening a Front end... He could just have two copies of the front end and open each. No different than two simultaneous users.
 
What if you added code in the startup to check for the presence of an lccdb file. While not fool-proof in cases where Access crashes and that file is not removed, at least normally would indicate that the access file is opened and if it is already opened, have the code close the database. I haven't actually tried it to know if that would impact the originally opened file, just an idea though.
 
2/5/2019 For the past 3 days, no crashes since I told our person not to open two copies of the same file.
He was doing a search of a record, looking at the record in Jones.accdb, get's another phone call, did not want to cancel
the screen that he was on, so he clicked on the desktop icon to open the file once more. then crash!

Each night we back up the Jones file to Jones_Backup.accdb

So I made a new desktop icon that gets Jones_Backup.

So far, no crashes.

Glen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top