I have an accdb Access app which is going to be used by different people in different departments. Each department is only allowed to access certain directories on a shared disk. So I will have to store the app in multiple, different directories so that users can run it. That app references an mda which contains lots of common functions and subroutines. I would therefore also like to have that same mda to be in multiple different directories.
So what I tried to achieve is that, when the app starts, it should delete the existing reference to the mda and add a reference to the "local" mda copy. I have added code to that effect in the app. But that doesn't work, because when the app starts, it has by definition a reference to an mda which it is not able to access because it is in a directory which it may not access (in this particular case, my development directory where I have the mda), so it cranks out an error (there is a broken reference...) which the users can't react to, and neither can the code at that point.
So, what are my options ?
is it possible to not have any reference at all to the mda in the app and add it on form load ? Or is it going to tell me that a reference is missing before the code can add it ?
Is it possible to trap the broken reference error ?
Or is the best solution to keep the mda in a directory which all users may access ? There is such a directory, but I'd like to avoid using it if only because anybody could then delete the mda by accident or because somebody might think that this file is not needed
Thanks for your opinions.