J
Joe Clark
I'm developing an Access application for my use as a teacher, in which
there's a table of Students and a table of Classes. (A class itself
is defined by a Course, a Semester, and a unique ID.) Classes and
Students have a many-to-many relationship with a linking table
imaginatively named Class_Student. I have a form that allows a
teacher to see and modify the "roster" of the class. It is a typical
form-subform deal where the main form is based on Class and the
subform on Class_Student with fields pulled in from Student. The
subform works great. I can add new students, and the Class_Student
linking record is made automatically. If I "delete" the record, it
deletes the link but doesn't delete the student from Students.
At the beginning of the semester, I may invite students to type in
their personal information, so I'm adding a pop-out "linked form" that
lets them enter their info one-by-one instead of in the subform's
datasheet view. I EXPECTED this would work the same as the subform,
but it doesn't. In the "linked form" I'll type a new student's name
and ID, and the Student will be created, but the Class_Student linking
record won't be created.
The SQL for the pop-out linked form is the same as that for the
subform and the filter is set properly. (I just ran the form wizard
to make a version of the mainform with a linked form, then copied the
code etc to my existing main form.) So... what can I do to get the
same effects as above? i.e. When new students are entered they should
be linked to the Class.
there's a table of Students and a table of Classes. (A class itself
is defined by a Course, a Semester, and a unique ID.) Classes and
Students have a many-to-many relationship with a linking table
imaginatively named Class_Student. I have a form that allows a
teacher to see and modify the "roster" of the class. It is a typical
form-subform deal where the main form is based on Class and the
subform on Class_Student with fields pulled in from Student. The
subform works great. I can add new students, and the Class_Student
linking record is made automatically. If I "delete" the record, it
deletes the link but doesn't delete the student from Students.
At the beginning of the semester, I may invite students to type in
their personal information, so I'm adding a pop-out "linked form" that
lets them enter their info one-by-one instead of in the subform's
datasheet view. I EXPECTED this would work the same as the subform,
but it doesn't. In the "linked form" I'll type a new student's name
and ID, and the Student will be created, but the Class_Student linking
record won't be created.
The SQL for the pop-out linked form is the same as that for the
subform and the filter is set properly. (I just ran the form wizard
to make a version of the mainform with a linked form, then copied the
code etc to my existing main form.) So... what can I do to get the
same effects as above? i.e. When new students are entered they should
be linked to the Class.