> Hello and thanks! I have an A2k mdb that suddenly lost its reference to
Microsoft Office 9.0 Object Library, yet the backup and a developement
copy have not lost the same reference (all copies reside on the same machine).
I do not have an explanation; how can i keep this from happening again? The
database has not been compliled (no modules, just subs contained in the
forms).
References can be curious things. I've had problems when a user with an
older version of Access tries to open a database shipped with references
specific to a newer version (e.g. 2002/2003). I keep this code on hand for
checking references, which may help, though I can't say I know why a
reference would disappear.
Public Function ReferenceInfo() As String
'run in the immediate window:
'?ReferenceInfo
On Error Resume Next
Dim r As Integer
Dim strMessage As String
Dim strTitle As String
Dim refItem As Reference
For Each refItem In References
If refItem.IsBroken Then
strMessage = "Missing Reference:" & vbCrLf & refItem.FullPath
Else
strMessage = "Reference: " & refItem.Name & vbCrLf _
& "Location: " & refItem.FullPath & vbCrLf
End If
r = r + 1
Debug.Print strMessage & " Total References = " & r; ""
Next refItem
End Function