Form Field dispalys #NAME?

Gladman

Registered User.
Local time
Today, 22:11
Joined
Aug 9, 2014
Messages
17
Hi all,

I have a form that contains an expression field to display the value of sale. It uses an;
IIf([Currency] = GBP, "£" & [ComponentPrice], IIf([Currency] = "USD", "$" & [ComponentPrice], IIf(........ for euros etc.

The field worked fine yesterday but today displays #NAME? and if I copy and paste the fields from a backup they work. This has happened a few times and I'm just wondering if anyone knows why this error occurs so I don't need to copy and paste the exact same fields.

Cheers
 
You shouldn't use long nested IIF statements in a textbox.
Instead use a query to translate codes to other codes.
You want a list on money codes,and their symbol to convert it to.

But your statement has GBP,instead of "GBP".
 
My statement links to a lookup table where 1 = GBP and I just translated it.
I see what you mean though that using a text box for expressions instead of a query is bad practice.
The money code is 1 example of 3 different text boxes that use expressions so I believe that will be my first thing to remedy.

Thanks
 

Users who are viewing this thread

Back
Top Bottom