I teach in a school and am producing a screen to show what proportion of students got a particular grade
I currently have a form which displays the following
Grade (a number from 0 to 9)
count of how many times the grade was achieved
this proportion as a %
My line manager would like this broken down to include three such forms
A breakdown from students who took a lower Foundation paper
A breakdown from students who took a lower Higher paper
A breakdown from all students (the form which I have)
I have a qryGradesforBreakdown which extracts all the results I need for any group of students and the following produces a count of how many of each grade there are
Code:
SELECT qryGradesforBreakDown.SlotID_FK, qryGradesforBreakDown.gradewhole, Count(qryGradesforBreakDown.gradewhole) AS CountOfgradewhole
FROM qryGradesforBreakDown
GROUP BY qryGradesforBreakDown.SlotID_FK, qryGradesforBreakDown.gradewhole;
The following query is the control source for my form
Code:
SELECT a1.SlotID_FK, a1.gradewhole, a1.CountOfgradewhole, Sum(a2.countofgradewhole) AS Running_Total, Format([Running_Total]/(select sum(Countofgradewhole) from qryBreakDownResults),"Percent") AS Pcent
FROM qryBreakDownResults AS a1, qryBreakDownResults AS a2
WHERE (((a1.gradewhole)<=[a2].[gradewhole])) OR (((a1.gradewhole)=[a2].[gradewhole]) AND ((a1.CountOfgradewhole)=[a2].[CountOfgradewhole]))
GROUP BY a1.SlotID_FK, a1.gradewhole, a1.CountOfgradewhole
ORDER BY a1.gradewhole, a1.CountOfgradewhole DESC;
It works perfectly but only shows the breakdown for all 191 students.
my simple question is can I split this information into three subforms. I have attempted this with very little luck as the Percentage column goes wrong.
Or should I just stick with a combo box for the view I'd like and use the combobox to filter.
Very frustrated..