G
Guest
I have a report text box that calculates the division of the values in two
fields. Unfortunately, on very rare occasions, the field used for the
denominator is zero, which of course results in divide by zero errors.
It would be very difficult to add something to the underlying query for this
report, due to its tricky construction from other links. Ideally, I'd like a
calculated control within the report itself which would test to see if the
denominator field was zero. If so, the calculation would be skipped, and the
text box would just be blank. If it were any number other than zero, the
division would occur, and the text box would display the value.
I thought that maybe I could use an IIf statement in the text box, but I
can't seem to come up with any workable syntax. I can get an IIf statement to
do the right thing in a query, but as I said, the particular query for this
report would be a nightmare to tweak.
Anyone have ideas?
Thanks,
Wes
fields. Unfortunately, on very rare occasions, the field used for the
denominator is zero, which of course results in divide by zero errors.
It would be very difficult to add something to the underlying query for this
report, due to its tricky construction from other links. Ideally, I'd like a
calculated control within the report itself which would test to see if the
denominator field was zero. If so, the calculation would be skipped, and the
text box would just be blank. If it were any number other than zero, the
division would occur, and the text box would display the value.
I thought that maybe I could use an IIf statement in the text box, but I
can't seem to come up with any workable syntax. I can get an IIf statement to
do the right thing in a query, but as I said, the particular query for this
report would be a nightmare to tweak.
Anyone have ideas?
Thanks,
Wes