DSUM with multiple string criteria - I surrender

Nyanko

Registered User.
Local time
Today, 19:01
Joined
Apr 21, 2005
Messages
57
I've been trying for hours to fix this without assistance, but just can't get my head around the syntax.

I need to combine these two statements into one DSUM, both of the criteria are strings :

Code:
=DSum("[InvoiceValue]","Qry_QTRRecon","[FY]='" & [form_cfy] & "'")

=DSum("[InvoiceValue]","Qry_QTRRecon","[ProjectCode]='" & [form_ProjectCode] & "'")

I know that I will kick myself, but I just can't seem to add that AND in without ballsing it up somehow :banghead:
 
I think
Code:
=DSum("[InvoiceValue]","Qry_QTRRecon","[FY]='" & [form_cfy] & "' AND [ProjectCode]= '" & [form_ProjectCode] & "' ")

Should work
 
I think
Code:
=DSum("[InvoiceValue]","Qry_QTRRecon","[FY]='" & [form_cfy] & "' AND [ProjectCode]= '" & [form_ProjectCode] & "' ")

Should work

Yes ! That did it.
Thank you so much, I have so much trouble with the single and double quotes - I'm going to pick apart that formula so I won't have so much grief next time !
:D
 

Users who are viewing this thread

Back
Top Bottom