Hi,
I have a field called WeeklyRevenue and another called WeeklyTarget. I have
a calculated field in a report called PercToTarget which is WeeklyRevenue
divided by WeeklyTarget. There are some records that have no Weekly Target
and a zero is in the field for these records. Whenever, I create my report I
get an ugly looking #Div/0! error message. My preference is to have nothing
to appear in my report rather than this error. Is there a way in a query or
report to make this happen?
Thanks,

Signature
Chuck W
David Lloyd - 18 May 2005 22:55 GMT
Chuck:
For the Control Source of the Report textbox you could have:
=IIF(WeeklyTarget<>0, WeeklyRevenue/WeeklyTarget,"N/A")

Signature
David Lloyd
MCSD .NET
http://LemingtonConsulting.com
This response is supplied "as is" without any representations or warranties.
Hi,
I have a field called WeeklyRevenue and another called WeeklyTarget. I have
a calculated field in a report called PercToTarget which is WeeklyRevenue
divided by WeeklyTarget. There are some records that have no Weekly Target
and a zero is in the field for these records. Whenever, I create my report
I
get an ugly looking #Div/0! error message. My preference is to have nothing
to appear in my report rather than this error. Is there a way in a query or
report to make this happen?
Thanks,

Signature
Chuck W
John Spencer (MVP) - 19 May 2005 01:02 GMT
In the query, your calculation would be something like the following
IIF(WeeklyTarget=0,Null,WeeklyRevenue/WeeklyTarget) as PercToTarget
> Hi,
>
[quoted text clipped - 9 lines]
> --
> Chuck W