#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2006
    Posts
    1
    Rep Power
    0

    Question VB Academic Report System


    Hi.
    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.
    Thanks!
  2. #2
  3. Type Cast Exception
    Devshed Supreme Being (6500+ posts)

    Join Date
    Apr 2004
    Location
    OAKLAND CA | Adam's Point (Fairyland)
    Posts
    14,954
    Rep Power
    8617
    I'd create an ordered query descending on the score since you're using a database.

    E.g.

    SELECT StudentID, StudentName, Rank FROM Scores ORDER BY Rank DESC;

    You can iterate the loop

    Do Until rsMyRecordSet.EOF
    ' // do something with rsMyRecordSet![Rank]
    rsMyRecordSet.MoveNext
    Loop
    medialint.com

    “Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss

IMN logo majestic logo threadwatch logo seochat tools logo