I'm trying to find the next value in a table that a student needs to achieve
once he has already passed one grade.
*tblStudents*
StudentID (PK)
FirstName
*tblGradingDates*
DateID (PK)
GradeDate
*tblGrades*
GradeID (PK)
Grade
Requirements
*tblGradingDetails*
DateID (FK) M -1 tblGradingDates
StudentID (FK) M -1 tblStudents
GradeID (FK) M -1 tblGrades
Cost
One student can go for many grades but only one grade at a time. One grading
can have many students going for a grade. What I'm after is to find what the
next Grade(ID) and requirements are for a student. The requirements are what
the student has to do before he can go for that grade.
I can find a student's current grade (StudentID =1) by using:
SELECT Last(tblGrades.Grade) AS LastGrade
FROM tblGrade INNER JOIN tblGradingDetails
ON tblGrades.GradeID = tblGradingDetails.GradeID
WHERE (((tblGradingDetails.StudentID)=1));
Is there any SQL statement that I can use that will find from tblGrades what
the next grade and requirements for that grade are for a student? Looping
through a recordset using DAO is something I'd do as the last resort. The
GradeID's are in numeric order.
TIA
Stewart