Access 2003 Runtime Error - Function not available in expressions (1 Viewer)

E

esvee

Guest
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
 

FoFa

Registered User.
Local time
Yesterday, 20:16
Joined
Jan 29, 2003
Messages
3,672
It sounds like the VBA files are not installed.
You should be able to do this using the STD office CD.
 

modest

Registered User.
Local time
Yesterday, 21:16
Joined
Jan 4, 2005
Messages
1,220
Yeah, you're definitely missing references :)

Also make sure your button's event is

buttonName_click()

not buttonName_onClick()
 

modest

Registered User.
Local time
Yesterday, 21:16
Joined
Jan 4, 2005
Messages
1,220
I'm just curious if you came to a solution?
 
M

manhquoc

Guest
Just check the lastest "Microsoft ActiveX Data Objects 2.x library" in the referecences will solve the problem.
 

Users who are viewing this thread

Top Bottom