There are umpten answers in this newsgroup to that question
feel free to flare if you've checked the service pack's on all computers
(read: references which are broken...)
anyways here's part of the type of startup code I *always* use to check the
references on opening of a db.
notice that all library functions include the library itself, this snippet
is part of a larger startup procedure
with parts I want to keep to myself (and/or I'm not at liberty to disclose)
I Believe Tony Toews has a web page on the subject - Great Minds .... ;-)
Public Function CheckRef(Optional ByVal ForceIt As Boolean = False) As
Boolean
Dim ref As Access.Reference, NewRef As Access.Reference
Dim pth As String, Msg As String
Dim Db As DAO.Database, QDef As DAO.QueryDef, Rs As DAO.Recordset
Dim i As Integer, Ret As Boolean
On Local Error Resume Next
Ret = True
If Ret = True Or ForceIt Then ' Wrong Version of DAO
Access.Application.Echo -1, "Updating Reference to Office Library"
Set ref = Nothing
Set ref = Access.References("OFFICE")
Ret = ref Is Nothing
If Not Ret Then Ret = ref.IsBroken
If Ret Or ForceIt Then
If Not ref Is Nothing Then Access.References.Remove ref
'Msg = ref.FullPath
Set ref =
Access.References.AddFromGuid("{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}", 2,
0)
CheckRef = True
End If
Set ref = Nothing
Set ref = Access.References("ComCtlLib")
If Not ref Is Nothing Or ForceIt Then
If ref.IsBroken Or ForceIt Then
Access.References.Remove ref
Set ref =
Access.References.AddFromGuid("{6B7E6392-850A-101B-AFC0-4210102A8DA7}", 1,
2)
CheckRef = True
End If
End If
Set ref = Nothing
Set ref = Access.References("FMSMEMOLib")
If Not ref Is Nothing Then
If ref.IsBroken Or ForceIt Then
Access.References.Remove ref
Set ref =
Access.References.AddFromGuid("{6B7E6392-850A-101B-AFC0-4210102A8DA7}", 1,
2)
End If
End If
End If
....
--
Pieter Wijnen
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca
Pete Merenda said:
Doug,
I'm getting the same error message (Function is not available (((filter
criteria)))). The error is attached to a command button that we've used for
months. But after making changes to other areas of the Db, and re-loading a
new version, the error appears on user's systems. It does not appear on mine
(yet everyone's privileges are set to 'Owner' and the Db is 'shared').