Brogrim
asked on
Function not available in query expression
I have put an application on to a different PC and am now getting teh following mesage when I try to open up some of the forms. the full error message is :
Function not available in query expression 'Trim(Trim(Trim(Trim(Trim( Trim(Trim( Trim(nz([H ouseNo],"" ) & nz([HouseLetter],"")) & " " & nz([HouseName],"")) & " " & nz([Address1],"")) & " " & nz([Address2],"")) & " " & nz([Address3],"")) & " " & nz([County],"")) & " " & nz([PostCode],"")) & " " & nz([PostCodePrefix],""))
It is working fine on other PC's, any ideas thanks in advance.
Function not available in query expression 'Trim(Trim(Trim(Trim(Trim(
It is working fine on other PC's, any ideas thanks in advance.
ASKER
I have opened a module in design view and selected references
How do I check if there is one missing?
How do I check if there is one missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
There was no missing in front of any of the referneces, I ticked on a few active x references and it worked.
Glad to help!
As a side note, you shouldn't use VB function calls in a query when you can avoid it. Your expression is equivalent to:
(HouseNo & HouseLetter)+' ' & HouseName+' ' & Address1+' ' & Address2+' ' & Address3+' ' & County & ' '+PostCode & ' '+PostCodePrefix
Which doesn't use VB at all. Note: "xx" & Field1 & "yy" returns "xxyy" when Field1 is Null (so you really don't need all those Nz() calls); "xx"+Field1 returns "xxabc" when Field1 contains "abc", and Null when Field1 is Null. This is how the trick with the spaces and the mix of & and + works.
This being said, the issue needs to be resolved anyway: there is something wrong with that particular installation.
(°v°)
(HouseNo & HouseLetter)+' ' & HouseName+' ' & Address1+' ' & Address2+' ' & Address3+' ' & County & ' '+PostCode & ' '+PostCodePrefix
Which doesn't use VB at all. Note: "xx" & Field1 & "yy" returns "xxyy" when Field1 is Null (so you really don't need all those Nz() calls); "xx"+Field1 returns "xxabc" when Field1 contains "abc", and Null when Field1 is Null. This is how the trick with the spaces and the mix of & and + works.
This being said, the issue needs to be resolved anyway: there is something wrong with that particular installation.
(°v°)
Check your references that nothing is missing.
Then check that you have the same service packs.
Good Luck!
Gary