SurreyNick
Member
- Local time
- Today, 01:50
- Joined
- Feb 12, 2020
- Messages
- 127
I could do with some help regarding the best way to approach the following tasks. It’s to do with entering students’ exam scores for the schools database I’m developing and it’s the thorniest task I’ve confronted so far. It’s not a simple case of just entering a student's total score for each exam taken, but how to go about capturing the scores for each and every question of exams that may have as many as 100 questions.
To help illustrate what I am trying to achieve I have included two pictures. The first is an illustration of the objects I think I need in a data entry form and the second shows the relevant tables in my database which would populate the form and also receive the data input. The ultimate goal is to populate a table (tblResults) with the student's “Score” for each question of an exam they have taken and along with this score I need to store a corresponding QuestionID and also a TestID this latter item being specific to each student i.e. different for each student.
If you look at the illustration for the data entry form you will see I want to include two combo boxes from which the user chooses an exam paper and a class ref. These combo boxes are named cboExamPaper and cboClass respectively and I want the selections from these two combo boxes to query the database and populate a list box with the names of each student in the selected class cohort who has taken the selected exam and along with each student name returned also return a unique reference number for each student. This reference number (tblTests.TestID) is one of the three values I need to store in my results table and is a combination of ExamPaperID+StudentID+TestDate. It is also via this tblTests table that the students need to be drawn for the selections made in the two combo boxes.
From the combo box selection of exam paper I also want to populate another list displaying all the question numbers for that particular exam, alongside which for every question is an empty box for the user to enter the score the student got for each question (this Score is another of the three values I need to store in my results table). Although the list displays all the question numbers for the exam the value it actually holds for each question is tblQuestions.QuestionID and this is the third of the three values I need to store in my results table.
The way I envision the form working is that the user clicks on one of the student names in the list box. This highlights the student name and also the tblTests.TestID (the value need to capture). The user then enters the score the student got for each question (moving from field to field by either tabbing or preferably hitting the enter key after each input). As they enter each score the calculated value in the Total Score field on the form gets updated. When the user finishes entering the scores for that student they click the “UPLOAD” button. When this UPLOAD button is clicked the code carries out the following validation checks:
If errors are found they are dealt with by relevant message boxes.
Once any errors are dealt with the user is presented with a “Are you sure you want to continue” message box, which prompts the user to check they have selected the same name in the list box of the data entry form as that written on the exam paper. Assuming everything is correct the code routine then needs to take the score entered for each question and include with it the the QuestionID and the TestID. This information needs to be appended to the tblResults table. Once this routine is complete the list of student names in the list box on the form needs to be refreshed so it displays just those for whom scores have yet to be uploaded.
I’m sure everything I want to do is possible but I really could do with some specific advice on the approach to take with the overall task and each step within it.
Many thanks in advance.
Nick.
To help illustrate what I am trying to achieve I have included two pictures. The first is an illustration of the objects I think I need in a data entry form and the second shows the relevant tables in my database which would populate the form and also receive the data input. The ultimate goal is to populate a table (tblResults) with the student's “Score” for each question of an exam they have taken and along with this score I need to store a corresponding QuestionID and also a TestID this latter item being specific to each student i.e. different for each student.
If you look at the illustration for the data entry form you will see I want to include two combo boxes from which the user chooses an exam paper and a class ref. These combo boxes are named cboExamPaper and cboClass respectively and I want the selections from these two combo boxes to query the database and populate a list box with the names of each student in the selected class cohort who has taken the selected exam and along with each student name returned also return a unique reference number for each student. This reference number (tblTests.TestID) is one of the three values I need to store in my results table and is a combination of ExamPaperID+StudentID+TestDate. It is also via this tblTests table that the students need to be drawn for the selections made in the two combo boxes.
From the combo box selection of exam paper I also want to populate another list displaying all the question numbers for that particular exam, alongside which for every question is an empty box for the user to enter the score the student got for each question (this Score is another of the three values I need to store in my results table). Although the list displays all the question numbers for the exam the value it actually holds for each question is tblQuestions.QuestionID and this is the third of the three values I need to store in my results table.
The way I envision the form working is that the user clicks on one of the student names in the list box. This highlights the student name and also the tblTests.TestID (the value need to capture). The user then enters the score the student got for each question (moving from field to field by either tabbing or preferably hitting the enter key after each input). As they enter each score the calculated value in the Total Score field on the form gets updated. When the user finishes entering the scores for that student they click the “UPLOAD” button. When this UPLOAD button is clicked the code carries out the following validation checks:
- That every question field has a corresponding (valid) score entered i.e. there are no Null values. Zeros are acceptable, but nulls are not.
- That the score entered for each question does not exceed the marks value for that question i.e. by checking the score entered against the value in tblQuestions.MarksValue for that QuestionID.
If errors are found they are dealt with by relevant message boxes.
Once any errors are dealt with the user is presented with a “Are you sure you want to continue” message box, which prompts the user to check they have selected the same name in the list box of the data entry form as that written on the exam paper. Assuming everything is correct the code routine then needs to take the score entered for each question and include with it the the QuestionID and the TestID. This information needs to be appended to the tblResults table. Once this routine is complete the list of student names in the list box on the form needs to be refreshed so it displays just those for whom scores have yet to be uploaded.
I’m sure everything I want to do is possible but I really could do with some specific advice on the approach to take with the overall task and each step within it.
Many thanks in advance.
Nick.