# Access 2003 Runtime Error - Function not available in expressions



## esvee2 (Mar 4, 2005)

I encounter the following error when running an Access 2003 MDE application.

"Function is not avaiable in expressions in query expressions".

The VBA functions this error refers to are "InStr" and "Format" which have been used within 2 queries.

The application works fine on the developement PC which has a full version of Access 2003 installed.

The PC in question runs Windows XP, Office 2003 Standard and Access 2003 runtime. I've also installed MDAC 2.8 which is the version the original MDB uses.

Seeing that the PC has only the runtime Access installed, I'm unable to check if there are any references missing.

Even running the following code from within a command button to see which references are missing produces an error.

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

I get the following error when trying to run this:

"The expression On Click you entered as the event property setting produced the following error: There was a problem referencing a property or method of the object."

Has anyone encountered a similar problem or have any ideas?

Thanks in advance for your assistance.

Steve


----------



## Rockn (Jul 29, 2001)

The reference libraries are more currnet on the development PC than the production PC. I had the very same problem this week and it is pretty easy to fix. Open your DB on the production PC giving you the error, go to the modules section and go to New module. At the top of the VB window go to Tools > Reference. THere should be a listing that states "not installed" or something to that effect. Unchck the entry and clost the VB editor and open the db again.


----------

