From: JohnW on 23 Mar 2010 22:19 I am trying to use an IIF statement to have a filed calculate based on another field having either Yes or No in it. The fields are: TotalTuitions - all the tuitions added together MultiClassTrigger - Yes/No fiield MultiClassDisc - 10% discount to be calculated depending on Yes/No IIF statement - MultiClassDisc:IIf([MultiClassTrigger]=Yes,[TotalTuitions]*0.1,0) This will work the first time that Yes is selected in the Trigger field but then the value will stay when I change the Trigger field back to No. With No selected it should change the discount field back to zero. I know I am missing something but can't come up with anything that will work. Any suggestions would be appreciated. Thanks. -- JCW
From: kc-mass on 23 Mar 2010 22:27 Hi John, Put your code in the afterupdate event of Multiclass trigger. Every time you update thr MultiClassTrigger the MultiClassDiscount will reset. Regards kevin "JohnW" <JohnW(a)discussions.microsoft.com> wrote in message news:5500BAEC-B9FC-440E-BB91-789AAF637C2B(a)microsoft.com... >I am trying to use an IIF statement to have a filed calculate based on > another field having either Yes or No in it. The fields are: > > TotalTuitions - all the tuitions added together > MultiClassTrigger - Yes/No fiield > MultiClassDisc - 10% discount to be calculated depending on Yes/No > > IIF statement - > MultiClassDisc:IIf([MultiClassTrigger]=Yes,[TotalTuitions]*0.1,0) > > This will work the first time that Yes is selected in the Trigger field > but > then the value will stay when I change the Trigger field back to No. With > No > selected it should change the discount field back to zero. > > I know I am missing something but can't come up with anything that will > work. Any suggestions would be appreciated. Thanks. > -- > JCW
|
Pages: 1 Prev: Multiple fields for same type of values Next: How to query |