#Num! shown calculation

QuChe Yvonne

Registered User.
Local time
Yesterday, 16:42
Joined
Oct 17, 2012
Messages
11
OT Hrs: IIf([Production Details]![Depositing Qty Overtime]<30,"0",Round(([Production Details]![End Time]-[Production Details]![End Work])*24,2))

The result was show properly. But when I used it the OT Hrs to multiply the OT quantity. The answer correctly calculation execpt the OT value was 0. The error show as #Num!.

Anyone could help for this? Thanks in advance.
 
Shouldn't the 0 not be in quotes as it is a value?
OT Hrs: IIf([Production Details]![Depositing Qty Overtime]<30,0,Round(([Production Details]![End Time]-[Production Details]![End Work])*24,2))
 
Calculation 1 : OK
OT Hrs: IIf([Production Details]![Depositing Qty Overtime]<30,0,Round(([Production Details]![End Time]-[Production Details]![End Work])*24,2))

Calculation 2 : Not OK :banghead:
=Nz([OT Qty],0)/Nz([OT Hrs],0)

The result still the came out #Num! in the event 0 OT.
 

Attachments

Hello, QuChe Yvonne,
You can not divide by 0; that is why you get the #Num! error.
 
Hello, QuChe Yvonne,

The easiest way not to show #Num! is not to divide by 0:
Code:
=Iif(Nz([OT Hrs],0)=0, 0, Nz([OT Qty],0)/Nz([OT Hrs],0))
 

Users who are viewing this thread

Back
Top Bottom