Reputation: 65
I'm stuck in deciding how best to do calculations. My main table contains marks for students, in which there are 11 subjects in each of the many exams....
I can easily visualize this in a query for each exam or even create a crosstab. I can get the average score in a report using calculated control box...
Question 1: How can I accomplish this in a query or vba instead of a report? I need a way in which I can compare performance in different exams, Do I also need to store the average in a table for this future reference?
Each exam (11 subjects) is identified by an examdate_id.... It can also be queried through parameters(ExamYear, Semester and examType) which I can get from a form's combo box
Question 2 follows later
[Main table: exams][1] [1]: https://i.sstatic.net/NJz3A.jpg
Upvotes: 1
Views: 37
Reputation: 8162
You want a trigger that calculates the average result. Access does not support database-triggers so you have to use a workaround with an event in a form.
AverageScore
to your Exams
-tableExams
-table. It should have the new attribute AverageScore
form_load
-event you retrieve all IDs from your students and update each AverageScore
based on the Exams-table ID.Upvotes: 1