Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

#Div/0! in query field

I'm getting #Div/0! in a query field result using:

SchedLBHR: [tblLoadingSchedule.TotalWeight]/[ConvertedSchedHrs]

I tried:

SchedLBHR: [tblLoadingSchedule.TotalWeight]/Nz([ConvertedSchedHrs],0)

But that didn't work.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The point is that you cannot divide by zero so using Nz(), although it will change null to zero isn't a complete solution.  Rey's example shows how to return a 0 when the divisor is zero
Avatar of SteveL13

ASKER

That did it.  Thanks.