Function is not available

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A program that has been running just fine has now decided to give me a
message "Function is not available in expressions in query expression
'format(([params.shoot_date]),mm/dd/yyyy')'. I've tested the same program on
a different machine and don't get the message. Can anybody give me some idea
what's going on.
Thanks.
 
CD said:
A program that has been running just fine has now decided to give me a
message "Function is not available in expressions in query expression
'format(([params.shoot_date]),mm/dd/yyyy')'. I've tested the same program on
a different machine and don't get the message. Can anybody give me some idea
what's going on.
Thanks.

You've got a missing/broken reference. Check the references on both
machines and you will likely see one marked "Missing" on the machine
with the problem.
 
A program that has been running just fine has now decided to give me a
message "Function is not available in expressions in query expression
'format(([params.shoot_date]),mm/dd/yyyy')'. I've tested the same program on
a different machine and don't get the message. Can anybody give me some idea
what's going on.
Thanks.

It could be one or both of two things.
1) Your expression is not correctly written.
It should be
Exp:format([params.shoot_date],"mm/dd/yyyy")

2) You computer may also have a missing reference.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

See Microsoft KnowledgeBase articles:
283115 'ACC2002: References That You Must Set When You Work with
Microsoft Access'
Or for Access 97:
175484 'References to Set When Working With Microsoft Access' for
the correct ones needed,
and
160870 'VBA Functions Break in Database with Missing References' for
how to reset a missing one.

For even more information, see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Rick,

Thanks for the reply, the problem I have is the machine I'm having problems
with doesn't have Access, I distribute the runtime so users don't have to own
access. Is there any other way to check for the missing references.


Rick Brandt said:
CD said:
A program that has been running just fine has now decided to give me a
message "Function is not available in expressions in query expression
'format(([params.shoot_date]),mm/dd/yyyy')'. I've tested the same program on
a different machine and don't get the message. Can anybody give me some idea
what's going on.
Thanks.

You've got a missing/broken reference. Check the references on both
machines and you will likely see one marked "Missing" on the machine
with the problem.
 
CD Tom said:
Rick,

Thanks for the reply, the problem I have is the machine I'm having problems
with doesn't have Access, I distribute the runtime so users don't have to own
access. Is there any other way to check for the missing references.

Add a button somewhere that runs the following

Sub EnumerateReferences()

Dim ref As Reference
Dim strOut As String

For Each ref In Access.References
strOut = strOut & vbCrLf & ref.Name & IIf(ref.IsBroken, " Missing", "
OK") & vbCrLf & ref.FullPath & vbCrLf
Next ref

MsgBox strOut

Exit Sub
 
Back
Top