crmarrio
Registered User.
- Local time
- Today, 20:25
- Joined
- Feb 5, 2002
- Messages
- 17
I have a multi-user database that contains several tables containing static reference data.
The reference data comes from a large Oracle DB, and for ease of speed, the Access DB has local tables made.
When I want to refresh the local tables, I have a macro "Update from Oracle" to run. It's a macro, but could be converted to VBA if needed.
However, I only want to be able to run this if I am the only user in the DB. Probably the best way to do is to open the DB in exclusive mode when running the update process.
The only problem then, is that I don't want (under any circumstances) the macro to run if the DB isn't open in exclusive mode.
Is there some code I can use such as:
If "MyDB.exclusive?" = yes then run macro
else msgbox "Not open in exclusive mode"
The reference data comes from a large Oracle DB, and for ease of speed, the Access DB has local tables made.
When I want to refresh the local tables, I have a macro "Update from Oracle" to run. It's a macro, but could be converted to VBA if needed.
However, I only want to be able to run this if I am the only user in the DB. Probably the best way to do is to open the DB in exclusive mode when running the update process.
The only problem then, is that I don't want (under any circumstances) the macro to run if the DB isn't open in exclusive mode.
Is there some code I can use such as:
If "MyDB.exclusive?" = yes then run macro
else msgbox "Not open in exclusive mode"