D
DS
I have this "iif" statement in a Query that is giving me problems, quite
frankly I'm just having problems writing it. Any help is appreciated.
Thanks
DS
BDIS: IIf([CDDiscountWhere]="A",
CCur(Nz(IIf([CDDiscountDP]=1,(BPrice*(1+CDTaxRate))+[CDQuantity]*[CDDiscountAmount],
IIf([CDDiscountDP]=2,-(([CDQuantity]*[BPrice])*(1+CDTaxRate))*[CDDiscountPercent]),
[CDQuantity]*[BPrice])),
IIf(CDDiscountType="B",
CCur(Nz(IIf([CDDiscountDP]=1,[CDQuantity]*[CDDiscountAmount],
IIf([CDDiscountDP]=2,-([CDQuantity]*[BPrice])*[CDDiscountPercent],
[CDQuantity]*[BPrice])))))
frankly I'm just having problems writing it. Any help is appreciated.
Thanks
DS
BDIS: IIf([CDDiscountWhere]="A",
CCur(Nz(IIf([CDDiscountDP]=1,(BPrice*(1+CDTaxRate))+[CDQuantity]*[CDDiscountAmount],
IIf([CDDiscountDP]=2,-(([CDQuantity]*[BPrice])*(1+CDTaxRate))*[CDDiscountPercent]),
[CDQuantity]*[BPrice])),
IIf(CDDiscountType="B",
CCur(Nz(IIf([CDDiscountDP]=1,[CDQuantity]*[CDDiscountAmount],
IIf([CDDiscountDP]=2,-([CDQuantity]*[BPrice])*[CDDiscountPercent],
[CDQuantity]*[BPrice])))))