Using Abs(Sum) to count a particular value from two fields

  • Thread starter Marge via AccessMonster.com
  • Start date
M

Marge via AccessMonster.com

I have been using the Abs(Sum) function in a report to count particular
values from specific fields. I have also used it to count Yes values in
two separate checkbox fields to produce one total. Example:=((Abs(Sum(
[Ad_sur_sa]=Yes)))+(Abs(Sum([Ch_sur_sa]=Yes)))) That example gives me the
total yes's from two fields.

My problem is, I have tried this same structure to generate a total from
two text fields (as opposed to checkbox fields) and it doesn't work.
Example: =((Abs(Sum([Sec_Sur1_age_range]="Adult_18-64")))+(Abs(Sum(
[Sec_Sur2_age_range]="Adult_18-64"))))

Would anyone be able to help?

Thanks,
Margaret
 
C

Chris Reveille

Try this

=DCount("[Sec_Sur1_age_range]","[nameofreportquery]", _
"[Sec_Sur1_age_range]='Adult_18-64'") + _
DCount("[Sec_Sur2_age_range]","[nameofreportquery]", _
"[Sec_Sur2_age_range]='Adult_18-64'")

Chris
 

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