View Single Post
 
Old October 16th, 2005, 04:45 PM
Figgis Figgis is offline
Authorized User
 
Join Date: Oct 2005
Location: South Ockendon, Essex, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Figgis
Default

If you wish to nest if statements you would need to decide what the primary question would be. Using your statement it could look something like the following:-

Sum(IIf([OL_PRICE]*([OL_QTY_ORD]-[OL_QTY_CAN_TD])=0,0,IIf([P_DESC]="*SS*",([OL_PRICE]/2),([OL_QTY_ORD]-[OL_QTY_CAN_TD]))))

It sort of runs like "Ask the first question, if the answer is no ask the second question, if the answer is no ask the third question. When you;ve asked all the questions if the answer is still no have a default value. The statement would stop at any stage that the answer was yes.

I'm not sure if that makes sence I'm more used to writing if statements in Excel and they can get absolutley huge.