Report Calculations (PLEASE HELP)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that holds 80 records. In one of the fields, it can either
hold a number 1, 2, 3, 4 or 5, or the text: N/A.

When I go to create a MS Access report, I want it to calculate how many of
each is recorded out of the 80 entries. e.g. how many 1’s are entered, how
many 2’s, 3’s, 4’s, 5’s and N/A’s.

Next, I would like it to calculate the percentage and display that answer
right next to the total of the numbers.

EXAMPLE:

1: 25 / 20%
2: 14 / 12%
3: 30 / 28%
4: 0 / 0%

and so on…

I don't know the formula I would use in my report to accomplish this. Can
anyone help me out please. :-)

Sincerely,

Leonard Peacock
 
Your report's record source would be something like:
SELECT UnnamedField, Count(UnnamedField) as NumOf
FROM tblUnNamed
GROUP BY UnnamedField;

Then in your report, to get the percentage use a control source of:
=NumOf/Sum(NumOf)
 
Thanks Duane for responding!! :-)

This report has other questions that have these same answers (1, 2, 3, 4 and
so on). Does this change the code you just gave, in any way? I wish their
was a better way of showing or perhaps posting the actual db so that others
may see it.

Wayne
 
What do you mean by "this report has other questions"? Reports have a record
source with records and fields and also controls on the report.

You can take the time to type some sample records into a reply as well as
how you would expect these to appear in the report.
 
Back
Top