Function isn't available error

  • Thread starter Thread starter Tom Tripicchio
  • Start date Start date
T

Tom Tripicchio

I receive this error when I try to run a query. This same query works fine
on another computer. I am running access 97. I went to Microsoft and pulled
up KBA 194374 and they mention the computers do not have the same library. I
have tried their solutions, but for whatever reason they are not working. I
does not matter if the computer OS is 98 or XP. What is an easy way to
update the computers that have access to this file? Any help is appreciated.
 
You need to find out why there's a difference between the two machines, and
apply whatever patches/upgrades are missing.

On the machine where it's working, copy the following code into a module,
then type ListReferences in the Debug window (and hit enter). It's not even
necessary to save the code module once you've run it.

Sub ListReferences()
Dim refCurr As Reference

For Each refCurr In Application.References
Debug.Print refCurr.Name & ": " & refCurr.FullPath
Next refCurr

End Sub

That will tell you where each referenced file is. Look in at properties of
each of those file through File Explorer, to determine what version each is.
Determine what version of each file is on the other machine.

Once you know which files need updating, for the Microsoft files, you can go
to http://support.microsoft.com/servicedesks/fileversion/dllinfo.asp? to
detemine where the newer version came from.
 
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').
 
Sounds like a References problem to me.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html



--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



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').
 
Back
Top