Which references should I check?

  • Thread starter Thread starter Del
  • Start date Start date
D

Del

I am self-taught in VBA for Access. I have been able to accomplish quite a
bit but have a lot of gaps in my knowledge. One of this gaps is knowing
which REFERECES to check in the Tools menu of the VBE. Can someone tell me
which REFERENCES should be checked?
 
In general, you're always best not adding any references, and just use the
ones Access provides by default. The one exception to that rule, in my
opinion, is you should always use DAO if you're only using Jet databases
(i.e.: your data's in an MDB or ACCDB file). That means you need to add the
reference to Microsoft.DAO 3.6 Object Library in Access 2000 and Access
2002, since those versions don't include it by default.

If you're using other libraries as part of your application, it's usually
best to use Late Binding if you can, so that you don't need to set
references to those other libraries.

Allen Browne lists the default references for each version at
http://www.allenbrowne.com/ser-38.html
 
Thank you. Microsoft.DAO 3.6 Object Library was the one that raised this
question.

I am putting an application togetther for some of my fellow employees that
will enable them to import excel files and compare them for changes. They
will need Microsoft.DAO 3.6 Object Library checked also. Is there any way to
check it with code so I don't have to walk each of them through the process?
--
Thank you,
Del


Douglas J. Steele said:
In general, you're always best not adding any references, and just use the
ones Access provides by default. The one exception to that rule, in my
opinion, is you should always use DAO if you're only using Jet databases
(i.e.: your data's in an MDB or ACCDB file). That means you need to add the
reference to Microsoft.DAO 3.6 Object Library in Access 2000 and Access
2002, since those versions don't include it by default.

If you're using other libraries as part of your application, it's usually
best to use Late Binding if you can, so that you don't need to set
references to those other libraries.

Allen Browne lists the default references for each version at
http://www.allenbrowne.com/ser-38.html
 
Is this what you need ?

Sub checkReferences()
Dim strMessage As String
Dim strTitle As String
Dim refItem As Reference
Dim ref As Reference

On Error Resume Next

For Each refItem In References
If refItem.IsBroken Then
strMessage = "Missing Reference:" & vbCrLf

Else
strMessage = "Reference: " & refItem.Name & vbCrLf _
& "Location: " & refItem.FullPath & vbCrLf
End If
MsgBox (strMessage)
Next refItem
End Sub

Del said:
Thank you. Microsoft.DAO 3.6 Object Library was the one that raised this
question.

I am putting an application togetther for some of my fellow employees that
will enable them to import excel files and compare them for changes. They
will need Microsoft.DAO 3.6 Object Library checked also. Is there any way to
check it with code so I don't have to walk each of them through the process?
 
Back
Top