Method 'IsBroken' of object 'Reference' failed

  • Thread starter david epsom dot com dot au
  • Start date
D

david epsom dot com dot au

Trying to debug a remote installation. We are getting this error:
Method 'IsBroken' of object 'Reference' failed

Any Suggestions?

(david)

from this code:
(The error is not going to the error handler).


'-------------------------------------------------
Private Sub Form_Open(Cancel As Integer)
On Error GoTo err_fcbr

Dim LibObject As Access.Reference

For Each LibObject In Application.References
If LibObject.IsBroken Or _
(LibObject.FullPath & "" = "") Or _
(LibObject.Name & "" = "") Then
bln_Broken = True
If LibObject.Kind = 0 Then
VBA.MsgBox "TypeLib reference failure. Cannot Continue.
Closing Down."
Else
VBA.MsgBox "Library Module not Found"
End If
Application.Quit 'this may not work anyway - it's an
object reference.....
End If
Next

Exit Sub


err_fcbr:
VBA.MsgBox "CTM Error Information..." & VBA.vbCrLf & VBA.vbCrLf _
& "Function: CheckBrokenRef" & VBA.vbCrLf _
& "Description: " & Err.Description & VBA.vbCrLf _
, VBA.vbInformation, "CTM Startup"

Application.Quit
Exit Sub
End Sub
 
D

Douglas J. Steele

What's the code

(LibObject.FullPath & "" = "") Or _
(LibObject.Name & "" = "") Then

supposed to be doing? I'm wondering whether it's a misleading error message
due to that part of the code?

Don't forget that neither of those properties exist for a broken reference.
 
D

david epsom dot com dot au

It was an access security permissions problem: the
user did not have permission to open one of the library
MDE. Running without the test, the problem mimicked
an MDE version problem.


Notes:
(1) The error was going to the error handler: that comment
was my mistake.
(2) (Doug Steel) Historically the Fullpath and Name tests
have failed in a situation where isBroken did not fire. In
practice 90% of our problems are caused by a missing MDE,
and are caught correctly: 10% of our problems are caused
by an indirect MDE reference version problem, and are missed
completely.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top