Hi guys,
I have a database that stores Exams against a Student and each Exam has Areas:
Student
--> Exams
--> ExamAreas
--> Areas
I have created a form for Student, which has a subform for Exams, and the Exams subform has a subform for ExamAreas.
I can add data to all fields no problem.
What I would like to do now is auto-populate records for my Areas records.
i.e:
If the class is Physics, the areas will be: area1,area7,area9.
If the class is Chemistry, the areas will be: area7, area2, area1
Make sense?
So when I select Physics in my Student subform, the Areas records for the ExamAreas table should auto populate with the areas specified.
Where do I place the logic that says:
and what might the code look like, i.e. how do I say:
Sorry if this doesn't read well...
I have a database that stores Exams against a Student and each Exam has Areas:
Student
--> Exams
--> ExamAreas
--> Areas
I have created a form for Student, which has a subform for Exams, and the Exams subform has a subform for ExamAreas.
I can add data to all fields no problem.
What I would like to do now is auto-populate records for my Areas records.
i.e:
If the class is Physics, the areas will be: area1,area7,area9.
If the class is Chemistry, the areas will be: area7, area2, area1
Make sense?
So when I select Physics in my Student subform, the Areas records for the ExamAreas table should auto populate with the areas specified.
Where do I place the logic that says:
Code:
If exam.class = "physics" Then
add all [B]Area[/B] records where the specified class is "physics" to the ExamAreas table.
End If
and what might the code look like, i.e. how do I say:
Code:
When I choose physics from this list, I want to update this table, with these records.
Sorry if this doesn't read well...