Left and string not working? Other bizarre problems? Do you have any references besides the basic three or four? Are you sure you need them? Write down the path and name of the extra ones (or put the following code in a module and execute the code), delete from the references list and Compile and Save All. Keep any necessary references and ensure they are distributed to the target system.
The following code uses late binding and gives you the full reference name such as you see in the references window. (Early binding would’ve required the Microsoft Visual Basic for Applications Extensibility reference. So lets make things simpler for the users.)
Dim refIDE As Object
For Each refIDE In Access.Application.VBE.ActiveVBProject.References
If refIDE.IsBroken = True Then
Debug.Print "Broken, GUID – " & refIDE.Guid
Debug.Print refIDE.Description & " – " & refIDE.Name & " – " & _
refIDE.Major & "." & refIDE.Minor & vbCrLf & _
" Location – " & refIDE.FullPath
Note that, to my knowledge, you can’t get any information about a broken reference other than the GUID. As this information for missing reference is included somewhere inside the Access database file I don’t have any access to the information that MS displays for a broken reference. And it’s not really needed for this kind of trouble shooting. It’s enough to know there is a broken reference.
To execute this code copy into a VBA module or create a new VBA modle. Copy and paste this code into the module. Ensure your cursor is within the subroutine and press F5. Then Ctrl+G will take you into the Debug/Immediate window to view the results. You should now see a list such as
Visual Basic For Applications – VBA – 4.0
Location – C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL
Microsoft Access 11.0 Object Library – Access – 9.0
Location – C:\Program Files\Microsoft Office 2003\OFFICE11\msacc.olb
Microsoft ActiveX Data Objects 2.8 Library – ADODB – 2.8
Location – C:\Program Files\Common Files\System\ado\msado15.dll
Microsoft DAO 3.6 Object Library – DAO – 5.0
Location – C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll
For a very detailed page on reference problems see
Updated 2010-10-22. Thanks to fellow Access MVPs Tom van Stiphout for pointing this out and to John Spencer for pointing out an easier way of running the code.