Text box will not show Currency when no information is in text box

  • Thread starter Russ via AccessMonster.com
  • Start date
R

Russ via AccessMonster.com

I have the following code in a text box;
=DSum("[PaymentAmount]","tblOrderPayments","[OrderID] = Forms![frmOrders]!
OrderID")
text box is set to currency, but will not show $0.00 when no information is
in the text box.
Any suggestions?
 
J

John Spencer

Do you mean the calculated control will not show $0.00 when
Forms!frmOrders!OrderID is null?

=DSum("[PaymentAmount]","tblOrderPayments","[OrderID] =
Forms![frmOrders]!OrderID")

You can try setting the format of the calculated control to
$0.00; -$0.00; $0.00;$0.00

Or you can surround the DSUM with the NZ function
=NZ(DSUM(...),0)

If Forms!frmOrders!OrderID is null (Blank) then your DSUM will return Null.
 
Top