Ringhal
02-20-2015, 12:50 AM
Hello VBA Express
We have a program built using Access that links to other databases, one at a time. This program runs a bit of VBA code to link to the database (a "back end") and after we make changes it will unlink when the program is closed. Basically, the way this works is, you select a file to link to and then click a button. The button does various things and eventually links to the database. I need a piece of code that will check whether the back-end database is being accessed before linking to the database.
We use cloud storage to collaborate changes to the databases and I want a function like this to avoid conflicts. The easiest way I thought of doing this is, by checking for the LDB file created by the database (as it's automatically and instantly synced across all users/devices). Also, I need a function to check that the LDB file is then deleted after the database is unlinked.
Unfortunately I cannot upload a sample as I don't know exactly how the linking is done, as I didn't build the program. I understand that checking for the LDB file is neither the best way nor foolproof, but I am also open to other suggestions.
Any help is greatly appreciated.
We have a program built using Access that links to other databases, one at a time. This program runs a bit of VBA code to link to the database (a "back end") and after we make changes it will unlink when the program is closed. Basically, the way this works is, you select a file to link to and then click a button. The button does various things and eventually links to the database. I need a piece of code that will check whether the back-end database is being accessed before linking to the database.
We use cloud storage to collaborate changes to the databases and I want a function like this to avoid conflicts. The easiest way I thought of doing this is, by checking for the LDB file created by the database (as it's automatically and instantly synced across all users/devices). Also, I need a function to check that the LDB file is then deleted after the database is unlinked.
Unfortunately I cannot upload a sample as I don't know exactly how the linking is done, as I didn't build the program. I understand that checking for the LDB file is neither the best way nor foolproof, but I am also open to other suggestions.
Any help is greatly appreciated.