I couldn't come up with an ACCESS solution, maybe one of the real experts can, however if you would be happy doing this in Excel I have some code.
I wrote a simple query which I then exported to Excel and then ran the macro to produce the results.
I expect that the whole thing , exporting to and running the excel macro can be done from ACCESS but that is not my forte.
The access query is simply
SELECT Pupil_Results.Subject, Pupil_Results.Levels, Pupil_Results.Name
FROM Pupil_Results
ORDER BY Pupil_Results.Subject, Pupil_Results.Levels;
I have attached the spreadsheet, as Results is created each time as a new sheet you need to delete it before running the macro, and as you will see I have not attempted any formatting yet as obviously you may reject the idea of Excel. I did it for fun so wont be hurt.
Brian