View Full Version : error statements


Skardy
10-25-2001, 06:20 AM
I have a formula in my query [sales/supply]. where there is no data in sales and supply #ERROR shows in the sheet view. I wouldlike tis to read 0 instead.
In excel I would use an if(iserror(sales/supply),0,sales/supply), I cannot find the equivalent in access. Any ideas??

directormac
10-25-2001, 07:41 AM
Skardy, check out IsNull, IsEmpty, and Nz in help.

Skardy
10-25-2001, 08:11 AM
Thanks directormac, unfortunately this didn't work. I think the problem lies where the equation is =0/0 where both sales and supply are zero. The Nz function will certainly come in useful in the future though!

Chris RR
10-25-2001, 08:39 AM
In pseudoVBA:

Iif(Supply = 0,0,Sales/Supply)

[This message has been edited by Chris RR (edited 10-25-2001).]