slicendice
Programmer
Hi
I have a report that is based on an SQL query. When I run the query as a standalone query, it works fine and brings back the correct data.
However, when I embed the query into a report and try to run it, I get the error:
"This expression is typed incorrectly, or it is too complex to be evaluated. Try simplifying the expression by assigning parts of the expression to variables."
How come it fails in the report?
Don't know if it helps but the query involved is:
SELECT Qualifications.Qualification,
StudentQual.DateQualified,
Students.Salutation,
Students.Surname,
Students.FirstName,
StudentQual.InstructorName
FROM Students INNER JOIN (Qualifications INNER JOIN StudentQual
ON Qualifications.QualificationID = StudentQual.QualificationID)
ON Students.StudentID = StudentQual.StudentID
WHERE Students.CurrentQualificationID=[StudentQual].[QualificationID]
ORDER BY Qualifications.Qualification,
StudentQual.DateQualified DESC ,
Students.Surname,
Students.FirstName;
There are 3 tables involved:
Students - holds student details including ref no of their current qualification
Qualifications - reference table with all qualifications and their associated ref nos
StudentQual - links a student to one or more qualifications - also includes the date the qualification was achieved
Hope this makes sense!
Thanks
I have a report that is based on an SQL query. When I run the query as a standalone query, it works fine and brings back the correct data.
However, when I embed the query into a report and try to run it, I get the error:
"This expression is typed incorrectly, or it is too complex to be evaluated. Try simplifying the expression by assigning parts of the expression to variables."
How come it fails in the report?
Don't know if it helps but the query involved is:
SELECT Qualifications.Qualification,
StudentQual.DateQualified,
Students.Salutation,
Students.Surname,
Students.FirstName,
StudentQual.InstructorName
FROM Students INNER JOIN (Qualifications INNER JOIN StudentQual
ON Qualifications.QualificationID = StudentQual.QualificationID)
ON Students.StudentID = StudentQual.StudentID
WHERE Students.CurrentQualificationID=[StudentQual].[QualificationID]
ORDER BY Qualifications.Qualification,
StudentQual.DateQualified DESC ,
Students.Surname,
Students.FirstName;
There are 3 tables involved:
Students - holds student details including ref no of their current qualification
Qualifications - reference table with all qualifications and their associated ref nos
StudentQual - links a student to one or more qualifications - also includes the date the qualification was achieved
Hope this makes sense!
Thanks