Divide by zero in formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My report has a control which shows a percentage calcultion. The control has
its control source set to =[Col1]/([Col2]-[Col3]). When the figures are zero,
the report prints '#Num!". Is there an easy way to avoid this. Ideally I'd
like to print a blank.
 
You could "do the math" in the query that underlies the report, and pre-test
for zero with an IIF() expression, something like:

IIF([Col2]-[Col3] = 0,"",[Col1]/([Col2]-[Col3])

Good luck!

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top