IIf expression Access

Simplify expression as Gasman showed. Or this one:

=[amount] * IIf([duty_type]='Adjunct', 0.33, 1)
 
Returning "Amount not found", makes the result a string and that will cause other problems down the line.

@andrew.abaye Welcome to AWF. As the others have mentioned there are at least two far better methods for handling this. Using a table is by far the best method but just simplifying the IIf() does a lot for readability. You have only two "outcomes" based on your original code
IIf([duty_type]='Adjunct',[amount]*0.33,[Amount])

.
 
Last edited:
Why do you even need to multiply by one?

Just to be safe, I'd also multiply it by itself, take the absolute value of that square root, add 0 to it and raise everything to the power of 1.
 

Users who are viewing this thread

Back
Top Bottom