Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing Multiple Data

Status
Not open for further replies.

trwebster

Technical User
Jan 23, 2004
18
US
I have a query that pulls client data between a certain time period. I'm trying to total the following in a report:

Ethnicity Under 18 18-59 60+ Total
White
African American
Hispanic

I'm using this as my control: =Sum(Abs([ethnicity]="W" and [client_age] >="60" or ([ethnicity]="10" and [client_age] >="60")))
(In the tables, the "w" and "10" both stand for White thanks to a new database conversion) I can get the 18-59 age range to turn out perfect, but the <18 and >=60 are adding 1 extra to the total.

Is there something I'm doing wrong in my expression or a better expression to try?
 
Hi,

Try calculating this in the query instead.

e.g. work out what age group the individuals in and then group the records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top