Insert records to a related table when an option is selected from list

C

celineusa

Hello!


Here is part of my database:


tblStudents: StudentID
tblMajorsAndStudents: StudentID, MajorID
tblMajors: MajorID
tblMajorsAndClasses: MajorID, ClassID, QuarterTaken
tblClasses: ClassID
tblStudentsAndClasses: StudentID, ClassID


When you create a new student, you can assign a major to that new
student.
Majors have a predefined set of classes that students have to take to
graduate.


When I add a major to a student, I would like to populate the
tblStudentsAndClasses with the classes that this student has to take in

order to graduate.
Moreover, if a student decides to change his major, I would like to
update the tblStudentsAndClasses, and remove all records that are
associated with the major, except the classes that have been taken
(QuarterTaken is defined).


Could anyone help me with that?


Thank you very much,
Celine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top