View Full Version : % In Query


fenhow
02-18-2010, 09:48 AM
Hi,

I am using this to calculate a % in my query.

Expr1: Format([SumOfNMA]/[Surface_Acres],"Percent")

It works great execpt where there are zeros, it shows error. Is there a work around for this?

Thanks.

Fen How

pbaldy
02-18-2010, 09:52 AM
Untested, but try

IIf([Surface_Acres] = 0, 0, Format([SumOfNMA]/[Surface_Acres],"Percent"))

fenhow
02-18-2010, 10:00 AM
Paul, You always come through.

Perfect! Thanks a million.

Cheers,

Fen

pbaldy
02-18-2010, 10:03 AM
No problem Fen.