this is not really how data is stored in a database. It would really look like:
STUDENTID, CODE, WORK, GRADE
12, MED111, Lecture, 73
12, MED113, LAB, 10
but you could build a form bound to a 'temp' input table. Then when all items are entered, a series of queries would run to post the grades.
but this would take lots of work and not very easy for modifications.
Instead , your 'form' above could be the Final result report.... an event that would take some work.
you could make a 'report' table similiar to yours, and append the data to it, and roll it up, and it would look like your example.
I would advise to not use this and use the tools the database provides. Simple entry of data via form (in database structure I showed above) and
a report the still provides all the info you need, but not in that layout you asked.
Keep it simple, the database will do a LOT of work for you.