It SOUNDS like you're keeping your "list" of classes in your transaction table. If that is the case, you can run something like this SQL:
insert into Transaction (StudentID, ClassID)
select StudentID, ClassID
from Student, Classes
Where
StudentID = "TheStudentIDYouJustEntered"
AND
ClassID in...