Hi,
I have a form with four fields. They are as follows:
1. Sales – This is a manual input.
2. Expense – This is manual input.
3. Profit = Calculated with formula (sales – expense).
4. ProfitPerc – Calculated with formula (profit / sales).
Everything works fine. My problem is that I do not want the formula for field 4 to calculate if sales are equal to zero. I thought I would be able to enter an IF statement in the control source (ie. If(sales <>0, profit / sales), 0) but it does not work. I was able to get it to work using an if then statement on the “On Exit” property of the sales field. For this to always work I have to also enter it on the expense “On Exit” property . I was trying to find another way. I would prefer to use the control source. Any ideas would be greatly appreciated.
Regards,
Stacy
I have a form with four fields. They are as follows:
1. Sales – This is a manual input.
2. Expense – This is manual input.
3. Profit = Calculated with formula (sales – expense).
4. ProfitPerc – Calculated with formula (profit / sales).
Everything works fine. My problem is that I do not want the formula for field 4 to calculate if sales are equal to zero. I thought I would be able to enter an IF statement in the control source (ie. If(sales <>0, profit / sales), 0) but it does not work. I was able to get it to work using an if then statement on the “On Exit” property of the sales field. For this to always work I have to also enter it on the expense “On Exit” property . I was trying to find another way. I would prefer to use the control source. Any ideas would be greatly appreciated.
Regards,
Stacy