Try this:
=Nz(DSum("[PaymentAmount]","[Payments]","[OrderID]=" &
[Reports]![Statement]![OrderID]),0)

Signature
Ken Snell
<MS ACCESS MVP>
> I have a report called "Statement", it is a billing statement
>
[quoted text clipped - 8 lines]
> =IIf(IsNull([OrderID]),0,DSum("[PaymentAmount]","[Payments]","[OrderID]=" &
> [Reports]![Statement]![OrderID]))
minimom - 25 Oct 2004 15:55 GMT
THANKS so very much, I can't believe I how simple you made this, I racked my
brain with every other expression except this one. Thanks again
> Try this:
>
[quoted text clipped - 19 lines]
> &
> > [Reports]![Statement]![OrderID]))
Ken Snell [MVP] - 25 Oct 2004 20:38 GMT
You're welcome.

Signature
Ken Snell
<MS ACCESS MVP>
> THANKS so very much, I can't believe I how simple you made this, I racked my
> brain with every other expression except this one. Thanks again
[quoted text clipped - 18 lines]
> > Is
> > > it because of the Null value problem I am having?
=IIf(IsNull([OrderID]),0,DSum("[PaymentAmount]","[Payments]","[OrderID]="
> > &
> > > [Reports]![Statement]![OrderID]))