vba - Transforming ms access database query results into a scoreboard -


i've constructed query in ms access database gives me information in table form so:

task |worker


task 1 |bob

task 2 |alice

task 3 |john

task 4 |bob

task 5 |alice

task 6 |bob

which need transform table in html used scoreboard:

bob | alice | john

task 1|task 2|task 3

task 4|task 5|

task 4|

i'm thinking of using vba, multidimensional arrays , loops extract data out, transform , outputting html table generated prepared html template.

am on right track or there way in sql , haven't learned enough of know how?