# Thread: Conditional calculation

1. Access 2003. As a non-programmer I find myself just outside my comfort zone. First a background note. Here in the UK if a tax-paying UK resident makes a donation to a charity the charity can claim 28p in the £ back from the Revenue Authority. This is called Gift Aid. Thus a £100 donation becomes £128 to the charity.

So, I have a form showing 'AmountDonated', GiftAid (a yes/no field showing whether the donation qualifies as GiftAid) and a calculated control that multiplies 'AmountDonated' by 1.28. I need to make the calculation conditional on 'GiftAid'=yes. Can someone point the way and say which event procedure is applicable.

2. Originally Posted by roger trigg
Access 2003. As a non-programmer I find myself just outside my comfort zone. First a background note. Here in the UK if a tax-paying UK resident makes a donation to a charity the charity can claim 28p in the £ back from the Revenue Authority. This is called Gift Aid. Thus a £100 donation becomes £128 to the charity.

So, I have a form showing 'AmountDonated', GiftAid (a yes/no field showing whether the donation qualifies as GiftAid) and a calculated control that multiplies 'AmountDonated' by 1.28. I need to make the calculation conditional on 'GiftAid'=yes. Can someone point the way and say which event procedure is applicable.

3. Thanks, Mark. I had to shorten your expression to '=IIF(GiftAid=True, AmountDonated*1.28)' before it worked.

4. Originally Posted by roger trigg
Thanks, Mark. I had to shorten your expression to '=IIF(GiftAid=True, AmountDonated*1.28)' before it worked.
It is odd that you had to shorten it, the standard version of an IFF statement has 3 parts, just as Mark posted.
• A test to perform
• An action to perform if the test is true
• an action to perform if the test is false.
If GiftAid is false , do you want the original AmountDonated to appear in the calculated column?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•