Page 1 of 1

Divide by zero error on formula

Posted: Thu Dec 08, 2005 10:39 am
by Nev Williams
I often get a divide by zero error using this formula because the Volume field is often zero. How can I prevent this?

1 / Stock->Volume

Posted: Thu Dec 08, 2005 11:02 am
by COBS Tech Support
Use this syntax:

IIF(Stock->Volume = 0, 0, 1 / Stock->Volume)