Dsum with multiple criteria

Unicon

Registered User.
Local time
Tomorrow, 01:18
Joined
Dec 24, 2009
Messages
123
Hi all,

I am trying to use Dsum criteria with multiple values but it's not working for me. Please see below I am trying to sum up 4 state's total but its not working for me.

=DSum("[S/G(M)]","QryCurrentRequirements(ClientHeads)","[State]=2 Or 4 Or 6 Or 7")


Please advice.
 
You could try ...

Code:
=DSum("[S/G(M)]","QryCurrentRequirements(ClientHeads)","[State] in (2,4,6,7)")
 
You can also use;
Code:
=DSum("[S/G(M)]","QryCurrentRequirements(ClientHeads)","[State]=2" & Or & "[State]=4" & Or & "[State]=6" & Or & "[State]=7")
 
Thanks Pat, I certainly made that far more complex than necessary, and screwed it up to boot :o

Code:
=DSum("[S/G(M)]","QryCurrentRequirements(ClientHeads)","[State]=2 Or [State]=4 Or [State]=6 Or [State]=7")
 

Users who are viewing this thread

Back
Top Bottom