Divide by 0 error

G

Gil Stone

Hi,

The following operation in a query, expenses/sells generates the following
msg: Divide by zero error encountered. I would imagine it's because some
fields have 0s (no expenses or sells). How do I get around it?

TIA

Gil



--------------------------------------------------------------------------------

Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados.
Ha eliminado 1061 correos spam hasta la fecha.
Los abonados no tienen este mensaje en sus correos.
¡Pruebe SPAMfighter gratis ya!
 
V

Van T. Dinh

Can't see your operation but you can use an expression usng IIf like:

MyVal: IIf([DivisorField] = 0, Null, [DividendField]/[DivisorField])

to avoid division by zero.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

playing w/dates 2
Datediff 2
Hiding info on page header 1
Port 21 blocked? 3
DOB 12
ADE problem 2
Storing dates 8
Local tables vs. linked 3

Top