Calculated Control Not Working

louisa

Registered User.
Local time
Today, 09:36
Joined
Jan 27, 2010
Messages
262
Hi all,

I have placed an unbound text box in my form and i am trying to get it to calculate a value, this is what i have put in the control source:

=Nz([Amount],0)/([ContractPeriod],0)*5

There is an amount in the "Amount" field which i want it to then divide by the amount in the "ContractPeriod" field and it to then * the figure by 5.
All i receive in the box is Error.
Does anybody no where i am going wrong?
 
=Nz([Amount],0)/([ContractPeriod],0)*5

=Nz([Amount],0)/Nz([ContractPeriod],0)*5

= 0/0*5 Error division by zero

change to

=iif(Nz([Amount],0)>0 and Nz([ContractPeriod],0)>0,([amount]/ContractPeriod])*5,0)
 

Users who are viewing this thread

Back
Top Bottom