G
Guest
I have a query as the source of a combo box whose SQL is:
SELECT tblStudent.StudentID, tblClass.ClassID, tblClass.Status,
tblGrade.SuspendDate
FROM tblClass INNER JOIN (tblStudent INNER JOIN tblGrade ON
tblStudent.StudentID = tblGrade.StudentID) ON tblClass.ClassID =
tblGrade.ClassID
WHERE (((tblStudent.StudentID)=[forms]![frmSelectStudent]![txtStudentID])
AND ((tblClass.Status)="O") AND ((tblGrade.SuspendDate)>Format(Now(),"Short
Date"))) OR
(((tblStudent.StudentID)=[forms]![frmSelectStudent]![txtStudentID]) AND
((tblClass.Status)="O") AND ((tblGrade.SuspendDate) Is Null));
Making this simple -- I am checking for records with O in them and a date
greater than today or the same and the date null.
This runs very slow.
Any ideas.
Thanks
SELECT tblStudent.StudentID, tblClass.ClassID, tblClass.Status,
tblGrade.SuspendDate
FROM tblClass INNER JOIN (tblStudent INNER JOIN tblGrade ON
tblStudent.StudentID = tblGrade.StudentID) ON tblClass.ClassID =
tblGrade.ClassID
WHERE (((tblStudent.StudentID)=[forms]![frmSelectStudent]![txtStudentID])
AND ((tblClass.Status)="O") AND ((tblGrade.SuspendDate)>Format(Now(),"Short
Date"))) OR
(((tblStudent.StudentID)=[forms]![frmSelectStudent]![txtStudentID]) AND
((tblClass.Status)="O") AND ((tblGrade.SuspendDate) Is Null));
Making this simple -- I am checking for records with O in them and a date
greater than today or the same and the date null.
This runs very slow.
Any ideas.
Thanks