• Another option (especially if you've got a report with many expressions that could result in divide by zero situations is to use a Custom Code function.

    In the Code tab/window of Report Properties, enter something like the following:

    Public Function DivideBy(ByVal Exp1, ByVal Exp2)

    If Exp2 = 0 Then

    DivideBy = 0

    Else : DivideBy = Exp1 / Exp2

    End If

    End Function

    Then insert the expression

    =code.DivideBy(Field!ToBeDivided.Value,Field!DividingBy.Value)

    into any cell that has the potential for divide by zero problems.

    [font="Comic Sans MS"]toolman[/font]
    [font="Arial Narrow"]Numbers 6:24-26[/font]