G
Gntlhnds
I have a crosstab query that I use to display grades in a report. All but one
of my classes uses numeric grades, which it uses a letter grade (just to show
the class was taken). In the crosstab query I've figured out how to get a
grade average for each student without that one class included, but I have
yet to figure out how to do it with it included. I get a "Datatype mismatch
in criteria expression" error. Here's my SQL (Please no lectures about
naming conventions, I inherited this database and I've tried changing them,
but gave up trying to hunt down everywhere the fields are used):
TRANSFORM Avg(tblCourseGrades.Grade) AS AvgOfGrade
SELECT TblStudents.[Class #], TblStudents.Rank, TblStudents.[Last Name],
TblStudents.[First Name], Avg(tblCourseGrades.Grade) AS AvgOfGrade1
FROM TblStudents INNER JOIN (tblCourses INNER JOIN tblCourseGrades ON
tblCourses.CourseID = tblCourseGrades.CourseID) ON TblStudents.StudentID =
tblCourseGrades.StudentID
GROUP BY TblStudents.[Class #], TblStudents.Rank, TblStudents.[Last Name],
TblStudents.[First Name]
ORDER BY TblStudents.[Class #], TblStudents.[Last Name]
PIVOT tblCourses.Course;
Any help would be greatly appreciated.
of my classes uses numeric grades, which it uses a letter grade (just to show
the class was taken). In the crosstab query I've figured out how to get a
grade average for each student without that one class included, but I have
yet to figure out how to do it with it included. I get a "Datatype mismatch
in criteria expression" error. Here's my SQL (Please no lectures about
naming conventions, I inherited this database and I've tried changing them,
but gave up trying to hunt down everywhere the fields are used):
TRANSFORM Avg(tblCourseGrades.Grade) AS AvgOfGrade
SELECT TblStudents.[Class #], TblStudents.Rank, TblStudents.[Last Name],
TblStudents.[First Name], Avg(tblCourseGrades.Grade) AS AvgOfGrade1
FROM TblStudents INNER JOIN (tblCourses INNER JOIN tblCourseGrades ON
tblCourses.CourseID = tblCourseGrades.CourseID) ON TblStudents.StudentID =
tblCourseGrades.StudentID
GROUP BY TblStudents.[Class #], TblStudents.Rank, TblStudents.[Last Name],
TblStudents.[First Name]
ORDER BY TblStudents.[Class #], TblStudents.[Last Name]
PIVOT tblCourses.Course;
Any help would be greatly appreciated.