davidbodhi
Davidbodhi
- Local time
- Yesterday, 18:20
- Joined
- Jul 6, 2005
- Messages
- 79
I have a combo box with the following 4 columns:
ItemID, Item_Name, Item_Cost and Taxable.
The fields are Autonumbered, Text, Currency and Yes/No, respectively.
I am trying to SUM sales tax, in the form footer, based on the Yes/No settings. Some items are taxed and some are not.
So far, I am able to get tax calculations on everything, only.
With this code as Control Source for the footer control:
=Sum(IIf([Taxable]=0,([Item_Cost]*[Quantity])*0.0556,0))
I get tax calculated on every item, regardless of its taxable flag.
When I use:
=Sum(IIf([Taxable]=1,([Item_Cost]*[Quantity])*0.0556,0))
I get no tax calculated at all. Always comes out zero.
For some reason, the calculation isn't distinguishing the Yes/No values for each record, independently.
Can anyone assist me in fixing this?
ItemID, Item_Name, Item_Cost and Taxable.
The fields are Autonumbered, Text, Currency and Yes/No, respectively.
I am trying to SUM sales tax, in the form footer, based on the Yes/No settings. Some items are taxed and some are not.
So far, I am able to get tax calculations on everything, only.
With this code as Control Source for the footer control:
=Sum(IIf([Taxable]=0,([Item_Cost]*[Quantity])*0.0556,0))
I get tax calculated on every item, regardless of its taxable flag.
When I use:
=Sum(IIf([Taxable]=1,([Item_Cost]*[Quantity])*0.0556,0))
I get no tax calculated at all. Always comes out zero.
For some reason, the calculation isn't distinguishing the Yes/No values for each record, independently.
Can anyone assist me in fixing this?