I think you mean one to many? Table2 would have these fields:
TABLE2
Table2ID
studentID(FK)
courseID(FK)
studentMarks
This would make it a junction table, and therefore you have a many-to-many relationship.
If you want to insert into Table2, you will want to have the studentID AND the courseID. You can take these on a form, and then you would have a grade selection as well on the form. If these were all combos (including the grade - value list) then you would do this:
Dim iStud As Integer
Dim iCourse As Integer
Dim sGrade As String
Dim sSQL As String
iStud = Me.cboStudent
iCourse = Me.cboCourse
sGrade = Me.cboGrade
sSQL = "INSERT INTO Table2(studentID, courseID, studentMarks)" & _
" VALUES(" & iStud & ", " & iCourse & ", '" & sGrade & "')"
DoCmd.RunSQL(sSQL) etc
If you want to create a student and a course and a grade all at one time, that is a little more problematic. Did this help?
mmcdonal
Look it up at:
http://wrox.books24x7.com