dpelizzari
Registered User.
- Local time
- Yesterday, 20:14
- Joined
- Jun 10, 2010
- Messages
- 26
I am currently working on a form that calculates the sum of counts and charges for various categories. The form sums the number of items in each category, then the sum of the charges. Where I am stuck is trying to break out the "per unit" charge for each category. The calculation works fine (sum of charges/sum of items) when there is a number greater than 0, but if the count or charges are 0, the fields display errors. I attempted to compensate for this by setting the text box value on the form to iif(iserror(sum of charges/sum of items),0,(sum of charges/sum of items), but it still shows the error!:banghead:. I could probably write nested iif statements to evaluate the values of each sum, but you would think this would be simpler. Help? Here is a sample of the actual ControlSource field on one of the text boxes: =IIf(IsError([SumOfOracle_Qual_Dev_Charge]/[SumOfBaseline Qualified Developer]),0,[SumOfOracle_Qual_Dev_Charge]/[SumOfBaseline Qualified Developer])