J
jlute
Hello all you MVP's and Access enthusiasts!
I have a tricky one that I can't resolve and thought maybe someone
could help!
If [Ti] is "0" then [Hi] + [AdditionalUnits]
If [Hi] is "0" then [Ti] + [AdditionalUnits]
If [Ti] is "1" or more and [Hi] is "1" or more then [Ti]*[Hi]+
[AdditionalUnits]
I came up with this but it's not returning as desired:
UnitLoadTotal: IIf(Nz([Ti],0)<>0,IIf(Nz([Hi],1)<>1,[Hi]+
[AdditionalUnits],IIf(Nz([Ti],1)<>1,IIf(Nz([Hi],0)<>0,[Ti]+
[AdditionalUnits],IIf(Nz([Ti],1)<>1,IIf(Nz([Hi],1)<>1,[Ti]*[Hi]+
[AdditionalUnits]))))))
This returns "13" for this scenario:
[Ti]2 [Hi]8 [AdditionalUnits]5
This should be "21" however the code is adding only 8+5.
This returns "9" for this scenario:
[Ti]10 [Hi]0 [AdditionalUnits]9
This should be "19" however the code is adding only 0+9.
Any help would be greatly appreciated - thanks!
I have a tricky one that I can't resolve and thought maybe someone
could help!
If [Ti] is "0" then [Hi] + [AdditionalUnits]
If [Hi] is "0" then [Ti] + [AdditionalUnits]
If [Ti] is "1" or more and [Hi] is "1" or more then [Ti]*[Hi]+
[AdditionalUnits]
I came up with this but it's not returning as desired:
UnitLoadTotal: IIf(Nz([Ti],0)<>0,IIf(Nz([Hi],1)<>1,[Hi]+
[AdditionalUnits],IIf(Nz([Ti],1)<>1,IIf(Nz([Hi],0)<>0,[Ti]+
[AdditionalUnits],IIf(Nz([Ti],1)<>1,IIf(Nz([Hi],1)<>1,[Ti]*[Hi]+
[AdditionalUnits]))))))
This returns "13" for this scenario:
[Ti]2 [Hi]8 [AdditionalUnits]5
This should be "21" however the code is adding only 8+5.
This returns "9" for this scenario:
[Ti]10 [Hi]0 [AdditionalUnits]9
This should be "19" however the code is adding only 0+9.
Any help would be greatly appreciated - thanks!