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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DSum Wrong Argument 2
Line Break 9
Function Returns 0 3
Using INT() 3
DSum Problem 2
Union Query Format 6
Sub-Query Problem 8
Not returning a value 7

Back
Top