the expression could not be saved because....

Cedarguy

Access developer wannabe
Local time
Yesterday, 23:33
Joined
May 8, 2012
Messages
39
Hello,

I'm concatenating the values of two fields (one is text and the other number) into another field (text).

I have the receiving field set up as calculated. The formula I'm using is "IIf([unit]="",[House Number],[Unit] & "-" & [House Number])".

The error I get is "the expression could not be saved because its result type, such as binary or null, is not supported by the server".

What am I doing wrong?

Thanks
 
Try:
Code:
IIf(Nz([unit] & "") = "", [House Number], [Unit] & "-" & [House Number])
... and remember not to add any other quotes.
 
Thank you.

Now it says "the expression (iif......) cannot be used as a calculated column".

:confused:
 
Little typo on my part:
Code:
IIf(Nz([unit][COLOR="Red"], ""[/COLOR]) = "", [House Number], [Unit] & "-" & [House Number])
... however, it would appear that IIF() is one of those functions that isn't allowed in a Calculated Field.

You can however build a query using your table as the source and add the expression to it.
 

Users who are viewing this thread

Back
Top Bottom