Replacing Values

G

George Schneider

I have a query that performs a calculation. The two fileds are QOH and Weekly Sales. I divide those two values to get a value for this new field. I get a #error when I divide when both values are 0 because you can't divid 0 into 0. Is there a way to replace all the #error values with 0. is so how would I accomplish this.
 
J

John Vinson

I have a query that performs a calculation. The two fileds are QOH and Weekly Sales. I divide those two values to get a value for this new field. I get a #error when I divide when both values are 0 because you can't divid 0 into 0. Is there a way to replace all the #error values with 0. is so how would I accomplish this.

Try:

IIF([Weekly Sales] = 0, 0, [QOH] / [Weekly Sales])
 

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

Top