M
Mary Fran
I have a report with the following query as its recordsource. It works fine
in Access 2003 but when I run in 2007 I get the "engine does not
recognize..." error. Can anyone help?
PARAMETERS [forms]![frmSelectTerm]![TermYear] Text ( 255 ),
[forms]![frmSelectTerm]![Term] Text ( 255 ),
[forms]![frmSelectTerm]![TermYear2] Text ( 255 ),
[forms]![frmSelectTerm]![Term2] Text ( 255 );
TRANSFORM sub.count
SELECT sub.Sport
FROM (SELECT Sub2.*, tblcCourses.Course, tblcCourses.CourseName,
tblcCourses.CourseCategory, Val(nz([count])) AS RecCount FROM (SELECT
DISTINCT 1 AS [count], tbllTutorsAthletesCourses.AthleteID,
tbllTutorsAthletesCourses.CourseID, tblmStudents.SSN,
tbllTutorsAthletesCourses.TutorID, tbllTutorsAthletesCourses.Year,
tblStudents.Sport, tblStudents.[Student ID], tblGPA.Term, tblGPA.Year,
tblGPA.Level, tblStudents.[Last Name], tblStudents.[First Name] FROM
((tblmStudents INNER JOIN tblStudents ON
tblmStudents.SSN=tblStudents.[Student ID]) INNER JOIN tblGPA ON
tblStudents.[Student ID]=tblGPA.StudentID) INNER JOIN
tbllTutorsAthletesCourses ON
tblmStudents.StudentID=tbllTutorsAthletesCourses.AthleteID WHERE
(((tbllTutorsAthletesCourses.Year)=2000+Val(forms!frmSelectTerm!TermYear))
And ((tblGPA.Term)=forms!frmSelectTerm!Term) And
((tblGPA.Year)=forms!frmSelectTerm!TermYear) And
((tbllTutorsAthletesCourses.Semester)=forms!frmSelectTerm!Term)) Or
(((tbllTutorsAthletesCourses.Year)=2001+Val(forms!frmSelectTerm!TermYear))
And ((tblGPA.Term)=forms!frmSelectTerm!Term2) And
((tblGPA.Year)=forms!frmSelectTerm!TermYear2) And
((tbllTutorsAthletesCourses.Semester)=forms!frmSelectTerm!Term2)) ORDER BY
tbllTutorsAthletesCourses.AthleteID, tblStudents.Sport, tblStudents.[Last
Name], tblStudents.[First Name]) AS sub2 RIGHT JOIN tblcCourses ON
Sub2.CourseID=tblcCourses.CourseID) AS sub
WHERE (((sub.Sport) Is Not Null))
GROUP BY sub.Sport
PIVOT sub.CourseCategory;
in Access 2003 but when I run in 2007 I get the "engine does not
recognize..." error. Can anyone help?
PARAMETERS [forms]![frmSelectTerm]![TermYear] Text ( 255 ),
[forms]![frmSelectTerm]![Term] Text ( 255 ),
[forms]![frmSelectTerm]![TermYear2] Text ( 255 ),
[forms]![frmSelectTerm]![Term2] Text ( 255 );
TRANSFORM sub.count
SELECT sub.Sport
FROM (SELECT Sub2.*, tblcCourses.Course, tblcCourses.CourseName,
tblcCourses.CourseCategory, Val(nz([count])) AS RecCount FROM (SELECT
DISTINCT 1 AS [count], tbllTutorsAthletesCourses.AthleteID,
tbllTutorsAthletesCourses.CourseID, tblmStudents.SSN,
tbllTutorsAthletesCourses.TutorID, tbllTutorsAthletesCourses.Year,
tblStudents.Sport, tblStudents.[Student ID], tblGPA.Term, tblGPA.Year,
tblGPA.Level, tblStudents.[Last Name], tblStudents.[First Name] FROM
((tblmStudents INNER JOIN tblStudents ON
tblmStudents.SSN=tblStudents.[Student ID]) INNER JOIN tblGPA ON
tblStudents.[Student ID]=tblGPA.StudentID) INNER JOIN
tbllTutorsAthletesCourses ON
tblmStudents.StudentID=tbllTutorsAthletesCourses.AthleteID WHERE
(((tbllTutorsAthletesCourses.Year)=2000+Val(forms!frmSelectTerm!TermYear))
And ((tblGPA.Term)=forms!frmSelectTerm!Term) And
((tblGPA.Year)=forms!frmSelectTerm!TermYear) And
((tbllTutorsAthletesCourses.Semester)=forms!frmSelectTerm!Term)) Or
(((tbllTutorsAthletesCourses.Year)=2001+Val(forms!frmSelectTerm!TermYear))
And ((tblGPA.Term)=forms!frmSelectTerm!Term2) And
((tblGPA.Year)=forms!frmSelectTerm!TermYear2) And
((tbllTutorsAthletesCourses.Semester)=forms!frmSelectTerm!Term2)) ORDER BY
tbllTutorsAthletesCourses.AthleteID, tblStudents.Sport, tblStudents.[Last
Name], tblStudents.[First Name]) AS sub2 RIGHT JOIN tblcCourses ON
Sub2.CourseID=tblcCourses.CourseID) AS sub
WHERE (((sub.Sport) Is Not Null))
GROUP BY sub.Sport
PIVOT sub.CourseCategory;