# Error

  • Thread starter needing help please
  • Start date
N

needing help please

Hi there,

I cannot find the post on converting # error to zero.

In a query, my field is:

% staff processed: (nz([staff],0))/(nz([client],0))

if the client value is zero, the returned value is # error.

Is there a way to make it show either 0 or n/a?

thanks
 
G

George Nicholson

% staff processed: iif(nz([client],0) =0, 0, nz([staff],0) / nz([client],0))
 
J

John Spencer

You need to test for Zero or null and handle that. Something like the
following.

% staff processed: IIF(NZ(Client,0)=0, 0,NZ(Staff,0)/Client))
 
Top