The narrative below and attached code are from the tips page of
www.aadconsulting.com and explains why your code s problematic.
__________________________
__________
__________
___
Fool-proof Way to Add a Library Reference
Those of you who develop Access add-ins or library databases, know that adding a reference to the addin or library database to the user .mdb (i.e. the CurrentDb)can be tricky, as the library file may not be where it is expected to be.
I use the following function, which is called each time the library file is loaded and uses the Name property of the CodeDb (being the library file opened by code in the CurrentDb) function to return the full path of the library file: