DSum Problem

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I'm getting the operation canceled error when I run this DSum. It must be
my Syntax!

Forms!frmCheckPayment!TxtDivideGrand =
Nz(DSum("iif(CDInclusive=-1,[CDQuantity]*[CDPrice]/1+[CDTaxRate],[CDQuantity]*[CDPrice]*[CDTaxRate])",
"tblChecksTMP", "CheckID = " & Me.TxtCheckID), 0)

Any help appreciated,
Thanks
DS
 
Try:

Forms!frmCheckPayment!TxtDivideGrand =
Nz(DSum(IIf(CDInclusive=-1,"[CDQuantity]*[CDPrice]/1+[CDTaxRate]","[CDQuantity]*[CDPrice]*[CDTaxRate]"),
"tblChecksTMP", "CheckID = " & Me.TxtCheckID), 0)

although to be honest, I'm not positive that will work.
 
Doug, I got it. The problem was a misspelled field. Working to long again.
I am surprised that the compiler didn't catch it.
Thanks
DS
 
Back
Top