Thanks a lot guys - your solutions worked!
Peter Miller <pmiller@pksolutions.com> wrote in message news:<ul78pvkneh3g7qrmucarfb10bhggq7o4qt@4ax.com>. ..[color=blue]
> Rick,
>
> On Mon, 20 Oct 2003 12:35:26 -0500, "Rick Brandt"
> <rickbrandt2@hotmail.com> wrote in comp.databases.ms-access:
>[color=green][color=darkred]
> >> I have an Access report which has two fields from a database on it. I
> >> have a third field which is just a textbox that divides one by
> >> another. My question/problem is that if the dividing field is 0 then
> >> I get a DIV/0 in my report.
> >>
> >> Ideally I would like it to say if field3 is div/0 then print 0.[/color]
> >
> >IIf(field2=0, 0, field1/field2)[/color]
>
> That certainly answers the original question, but isn't the original
> question suspect? Why does the OP want 0 to represent both 0/N and
> 0/0? In general, one should really be distinguishing between 0/0 and
> 0, or more specifically, the formula should be something like:
>
> IIf(field2=0, 'n/a', field1/field2)
>
> or, at least
>
> IIf(field2=0, null, field1/field2)
>
>
>
> Peter Miller
> __________________________________________________ __________
> PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
> Free quotes, Guaranteed lowest prices and best results
>
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051[/color]