Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 Runtime Error - Function not available in expressions

Status
Not open for further replies.

esvee

IS-IT--Management
Jun 27, 2002
15
AU
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
 
I can't explain but it sounds like you need a reference to to the right version of Word in the project. I've hit this problem when I've built on an Office 97 system then put the database on a system with Access 97 and Word XP.

Geoff Franklin
 
I have been having similar problem. Got a new computer with Windows XP, expressions in queries where I used format(... no longer worked. Was upgraded to Office 2003 and still have problems tried the formatdatetime(... function, and problem went away. Just don't have the format I wanted. Seems to be a difference in the underlying language.
Investigate the alternative functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top