DSum multiple criteria syntax problem

G

GD

I'm getting a "The expression you entered contains invalid syntax. You may
have entered an operand without an operator." error message when attempting
the expression:

=DSum("[DiscAmt]","011_DiscTaken_t","[CheckNo]='" &
Forms![008ListCodeUEDs_frm002]!CheckNo & "' And [DCNo]=295 And
(DLookUp("[Days]","012_Terms_t","[Terms]='" &
(DLookUp("[Terms]","011_DiscTaken_t","[CheckNo]='" &
Forms![008ListCodeUEDs_frm002]!CheckNo & "'") &
"'")))<([011_DiscTaken_t!DatePaid]-[011_DiscTaken_t!InvDate])")

Datatypes:
Currency: DiscAmt
Text: CheckNo, Days, Terms
Number: DCNo
Date: DatePaid, InvDate

Can anyone help me fix the syntax?
 

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

Top