I have built a large database in Access 2010, but some of my users are using Access 2007. Access has no problem upgrading references (ie, MS Outlook) to newer versions, but does not nicely downgrade references. The solution I am attempting to implement is to use an AutoExec function to remove the broken references when the database opens, and then immediately re-add the reference by its GUID.
A simple attempt to remove broken references is:
Dim ref As Variant
For Each ref In .References
If ref.IsBroken Then
This process for removing the references seems acceptable, as it is documented in this book
However, the ref.IsBroken line fails with "Error in loading DLL".
Even Microsoft uses this kind of code to detect broken references:
When I run the code in the above article, I get the same "Error in loading DLL" on the ref.IsBroken line. If I try to Resume Next and remove the broken reference (which is the ultimate goal), I get the same error.
The question is, how do I remove the broken references using VBA when the database is opened?
I have heard a lot of talk of using late binding to resolve reference errors, but this would require significant changes to a very large code base. In addition, I don't want to lose Intellisense, and I'd rather not muddy up my code with conditional compilation.
Similar (failed) attempts at resolving this issue:
This thread describes my problem and attempted solutions well: