tpigielski
asked on
Updating tables through a form / subform combination
I have an Access 2007 database that has two tables. One table contains class information (class number, class date, location, etc.). The other table contains student certification information (e.g. written test score, skills test score, certification date, etc.) These table are linked together in a form / subform combination.
Form:
Class Name:
Class Date:
Class Location:
etc.
Subform:
Stuent ID, First Name, Last Name, Written Score, Skills Score, etc.
So, for every class, I want to add a student, from another student table. At first, all that would be entered into the subform would be the first name and last name. Whe the student completes the class, I would enter the written score and skills score. This information would be stored in a table other than the main student table (i.e. a student certification table).
I can create a query to join the student table with the student certification table (where the scores are stored), and display them in the subform. I can set the subform up to grab the student name from the student table with a combo box to add students to the subform, but the problem is, since I am using a query to create the subform, I cannot update the student certification info through this subform.
This is the SQL associated with the underlying query for the subform:
SELECT Student.Student_ID, Student.First_Name, Student.Last_Name, Student_Certification.[Wri tten Test Score], Student_Certification.[Ski lls Test Score], Student_Certification.Date Submittedt oASA, Student_Certification.[Cer tification Date]
FROM Student INNER JOIN Student_Certification ON Student.Student_ID = Student_Certification.Stud ent_ID;
I hope I'm being clear enough here as to what I am trying to do.
Thanks for any help you can offer as to how to do what I want to do.
Tom
Form:
Class Name:
Class Date:
Class Location:
etc.
Subform:
Stuent ID, First Name, Last Name, Written Score, Skills Score, etc.
So, for every class, I want to add a student, from another student table. At first, all that would be entered into the subform would be the first name and last name. Whe the student completes the class, I would enter the written score and skills score. This information would be stored in a table other than the main student table (i.e. a student certification table).
I can create a query to join the student table with the student certification table (where the scores are stored), and display them in the subform. I can set the subform up to grab the student name from the student table with a combo box to add students to the subform, but the problem is, since I am using a query to create the subform, I cannot update the student certification info through this subform.
This is the SQL associated with the underlying query for the subform:
SELECT Student.Student_ID, Student.First_Name, Student.Last_Name, Student_Certification.[Wri
FROM Student INNER JOIN Student_Certification ON Student.Student_ID = Student_Certification.Stud
I hope I'm being clear enough here as to what I am trying to do.
Thanks for any help you can offer as to how to do what I want to do.
Tom
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
For subform you name M table, that is many students per class. Each record in this table is tagged with a class code to make the record unique per student.
The form will have the class table as a record source.
The subform will have a qquery joining both tables, but the fields belong to the students. Other fields from class may be used for display purposes.
Once you proceed in the design, you will find that you need other tables and link them in a suitable way.