Check for loaded reference libraries

P

PJFry

My firm just upgraded to Access 2007 and I have noticed that some of the apps
I have developed that use ADODB recordsets did not work. I found that the
proper libraries were not loaded and fixed the problem.

What I want to be able to do is to programmatically check to see if those
libraries have been loaded. Then, if possible, programmatically load them.

Can either of these things be done?

Thanks!
PJ
 
D

Douglas J. Steele

Dim refCurr As Reference
Dim strBroken As String

For Each refCurr In References
If ref.IsBroken Then
strBroken = strBroken & refCurr.Name & vbCrLf
End If
Next refCurr

If Len(strBroken) > 0 Then
MsgBox "The following references are broken:" & vbCrLf & strBroken
Else
MsgBox "All references are okay."
End If
 
D

David W. Fenton

Dim refCurr As Reference
Dim strBroken As String

For Each refCurr In References
If ref.IsBroken Then
strBroken = strBroken & refCurr.Name & vbCrLf
End If
Next refCurr

If Len(strBroken) > 0 Then
MsgBox "The following references are broken:" & vbCrLf &
strBroken
Else
MsgBox "All references are okay."
End If

I'm pretty sure that without late binding, this code will never
trigger the first error message, as it won't be able to run.

Seems to me that Michael Kaplan's article on this subject is a
darned good reference on how to deal with it:

http://trigeminal.com/usenet/usenet026.asp?1033
 

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