R
Richard Hollenbeck
The where clause should read a value from an open form. A report is based
on this query but I get the following error when I attempt filter the output
like this:
"The Microsoft Jet database engine does not recognize
'[Forms]![frmSelectCourse]![cboSelectCourse]' as a valid fieldname or
expression."
The combo box and form name are indeed spelled correctly, and the form IS
open. The query is a saved query called "qryTableOfGrades" and the report
is called "rptTableOfGrades."
I don't want a report on every course, just the one that was selected in the
previous form (frmSelectCourse). It works (somewhat) without the where
clause but it gives faulty data. Here's my query so far:
TRANSFORM Sum(studentScores.score) AS SumOfscore
SELECT studentsInCourses.courseCode, courses.courseCode,
courses.courseDescription, [lName] & ", " & [fName] AS [Student Name]
FROM students INNER JOIN (((courses INNER JOIN groups ON courses.courseCode
= groups.courseCode) INNER JOIN studentsInCourses ON courses.courseCode =
studentsInCourses.courseCode) INNER JOIN (activities INNER JOIN
studentScores ON activities.activityID = studentScores.activityID) ON
groups.groupID = activities.groupID) ON (students.studentID =
studentsInCourses.studentID) AND (students.studentID =
studentScores.studentID)
WHERE (((courses.courseCode)=[Forms]![frmSelectCourse]![cboSelectCourse]))
GROUP BY studentsInCourses.courseCode, courses.courseDescription, [lName] &
", " & [fName]
ORDER BY studentsInCourses.courseCode
PIVOT activities.activityDescription;
Ideas? Thanks.
Rich Hollenbeck
on this query but I get the following error when I attempt filter the output
like this:
"The Microsoft Jet database engine does not recognize
'[Forms]![frmSelectCourse]![cboSelectCourse]' as a valid fieldname or
expression."
The combo box and form name are indeed spelled correctly, and the form IS
open. The query is a saved query called "qryTableOfGrades" and the report
is called "rptTableOfGrades."
I don't want a report on every course, just the one that was selected in the
previous form (frmSelectCourse). It works (somewhat) without the where
clause but it gives faulty data. Here's my query so far:
TRANSFORM Sum(studentScores.score) AS SumOfscore
SELECT studentsInCourses.courseCode, courses.courseCode,
courses.courseDescription, [lName] & ", " & [fName] AS [Student Name]
FROM students INNER JOIN (((courses INNER JOIN groups ON courses.courseCode
= groups.courseCode) INNER JOIN studentsInCourses ON courses.courseCode =
studentsInCourses.courseCode) INNER JOIN (activities INNER JOIN
studentScores ON activities.activityID = studentScores.activityID) ON
groups.groupID = activities.groupID) ON (students.studentID =
studentsInCourses.studentID) AND (students.studentID =
studentScores.studentID)
WHERE (((courses.courseCode)=[Forms]![frmSelectCourse]![cboSelectCourse]))
GROUP BY studentsInCourses.courseCode, courses.courseDescription, [lName] &
", " & [fName]
ORDER BY studentsInCourses.courseCode
PIVOT activities.activityDescription;
Ideas? Thanks.
Rich Hollenbeck