By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,224 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,224 IT Pros & Developers. It's quick & easy.

#Error in query

P: n/a
itm
Greetings!

Round(1-Round([CYTaxValue]/[PY1TaxValue],2),2)

The above works fine unless CYTaxValue=0 and PY1TaxValue=0. Then I get
an #Error message. Is there a way to eliminate the error message and
reflect the result as 0?

Thanks so much for your help!

Mary Ann

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
it*@itmservices.com wrote:
Greetings!

Round(1-Round([CYTaxValue]/[PY1TaxValue],2),2)

The above works fine unless CYTaxValue=0 and PY1TaxValue=0. Then I get
an #Error message. Is there a way to eliminate the error message and
reflect the result as 0?

Thanks so much for your help!

Mary Ann


Well you can't divide by zero around here so you could try this or
something similar:

IIf ([PY1TaxValue]=0,0,Round(1-Round([CYTaxValue]/[PY1TaxValue],2),2))

--
Smartin
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.