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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Demographics grouped with percentages in a Report

Status
Not open for further replies.

Pineland

Programmer
Jun 4, 2002
4
0
0
US
I need to produce a report from my database that outputs in the following form:

Total Records
212

Under 50 37.26%
79
Over 50 62.74%
133

Age Range
21 to 29 0.47%
1
30 to 39 13.68%
29
40 to 49 23.11%
49
50 to 59 37.74%
80
60 to 69 21.70%
46
70 to 79 3.30%
7

I have a query that gives me an age for each person in the database and I have a crosstab query that counts the number of people who are (for example)age 35 = 6, age 48 = 7, etc.
How do I group the records as above and produce the percentages in a report? Do I need another query? I can do it in a spreadsheet but I don't know how to get Access to do it. The actual formatting isn't that important to me. Just the results.
 
You need to use Group Headers & Footers.
A Group would be "Over 50", so in the footer you can have the calculation for the percentage you wish to display then copy this to the Header and format to suit your tastes.
So the group would be base on Age Range and the data would be shown in the detail section
Header - Over 50 Age Group
Detail - No. of records 7
Footer - textbox with %age calculation

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top