September 7th, 2006, 09:21 AM
VB Academic Report System
I'm pretty new to programming and I've been trying to make a program that collects exam results and then automatically generates ranked class performance & reports for individual students.
I am using VB 6.0 and Access. The system should work as follows:
User enters individual subject grades for CAT 1 (term work) e.g. English – 80%, Math – 60% etc.
User enters individual subject grades for CAT 2 (Exam) e.g. English – 76%, Math – 95% etc.
The system should then add the totals of CAT 1 & 2 and get the total mark for the student. This total mark is then divided by the number of subjects done to get the average grade.
It is with this average grade that the students are ranked from highest to lowest.
The ranking is what’s giving me trouble. I need to automatically generate the positions. To do this, do I use a loop? If so, which one? In addition, if students have the same grade then I need the system to consider this i.e. if students 10, 11, and 12(chronologically) have the same average, the system needs to assign them the same position i.e. 10 and then assign the next student position 13. How do I manage this?
Any and all input into making this work and any improvement or suggestions are welcome.
September 7th, 2006, 10:36 AM
I'd create an ordered query descending on the score since you're using a database.
SELECT StudentID, StudentName, Rank FROM Scores ORDER BY Rank DESC;
You can iterate the loop
Do Until rsMyRecordSet.EOF
' // do something with rsMyRecordSet![Rank]
“Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss