#Error using Iif(x,0,Trim(Right([NettingGrp],20))

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I get a #error returned if the following Iif statement is false:

Netting_Group: IIf(Trim([NettingGrp])=0,0,Trim(Right([NettingGrp],20)))

Meanwhile, the following statement returns the string expected:

RtNtgGrp: Trim(Right([NettingGrp],20))

Why should the Iif statement return #Error when the same Trim(Right(
functions return a valid result in the same query?

--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via http://www.accessmonster.com

.