=DSum("Amt", "YourTable", "[Arr] = 2 And [colour]='red'")
Note the single quotes around red. You could also use double quotes, but to
insert a double quote inside of double quotes require that you double up the
quotes:
=DSum("Amt", "YourTable", "[Arr] = 2 And [colour]=""red""")
Note, too, that should your field or table name include blanks, you need
square brackets around the name:
=DSum("Amt", "[Your Table]", "[Arr] = 2 And [colour]='red'")
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
zyus said:
What if i want to add additional criteria...say [arr] =2 and
[colour]=red...
How to add it in your formula below....Thanks again
Van T. Dinh said:
Try:
=DSum("Amt", "YourTable", "[Arr] = 2")
--
HTH
Van T. Dinh
MVP (Access)
I hv this records of data :
Arr Amt
---- -----
0 100
2 100
2 200
3 100
When i use this =Sum(Abs([Arr]=2)) i get 2 as result..
Q...How to sum the Amt where the criteria is same as above ctrl..
i expect the sum to be 300
Thanks