DSum Wrong Argument

D

DS

I'm trying to use this DSum function but I keep getting the wrong number
of arguments. Any help appreciated.
Thanks
DS


Me.TxtTax = DSum(IIf(CDDiscountDP = 1, "((CDQuantity *
CDFinalPrice)+CDiscountAmount)*CDTaxRate",
((CDQuantity * CDFinalPrice) * CDDiscountPercent) * CDTaxRate,
"tblCheckDetails"))
 
C

Cindy

Try this instead:
DSum(IIf(CDDiscountDP = 1, "((CDQuantity * CDFinalPrice)
+CDiscountAmount)*CDTaxRate",
"((CDQuantity * CDFinalPrice) * CDDiscountPercent) * CDTaxRate"
),"tblCheckDetails")

Cindy
 
D

DS

Cindy said:
Try this instead:
DSum(IIf(CDDiscountDP = 1, "((CDQuantity * CDFinalPrice)
+CDiscountAmount)*CDTaxRate",
"((CDQuantity * CDFinalPrice) * CDDiscountPercent) * CDTaxRate"
),"tblCheckDetails")
Cindy
Thanks Cindy
That did the trick!
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

Line Break 9
DSum Problem 2
SQL Rowsource 1
Query iiF Woes 2
Function Returns 0 3
Not returning a value 8
Blank in Listbox 1
Sub-Query Problem 8

Top