Maybe its not that complicated. It's saying Error Code 13 Type Mismatch.
Thanks
DS
(re-posting -- I don't see my original reply)
>I have these two DSum statements that I get an Error on because the table
>is Empty.
[quoted text clipped - 10 lines]
> yellow. When I put th ecursor over the GiftDebit field in the statement it
> says empty. How can I fix this?
I don't think it's because the table is empty. I think it's because your
criteria argument is malformed. Am I right in thinking that GiftDebit is a
field in the table, and you want to sum records where the GiftCardNumber
field is equal to the TxtGiftID value from the form, and the GiftDebit field
= -1 (True) in one case, and 0 (False) in the other case? If so, then try
these versions of the statements instead:
Me.TxtDebit = _
Nz(DSum("[GiftAmount]", "tblGiftCardDetails", _
"GiftCardNumber = " & Forms!frmFXGiftManager!TxtGiftID & _
" And GiftDebit = -1"), 0)
Me.TxtCredit =
Nz(DSum("[GiftAmount]", "tblGiftCardDetails", _
"GiftCardNumber = " & Forms!frmFXGiftManager!TxtGiftID & _
" And GiftDebit = 0"), 0)

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
DS - 31 Jul 2008 23:17 GMT
Woks great.
Thank You once again.
DS