R
Robert T
Hello:
I'm trying to build a query that counts the number of students who
registered for our classes between two dates, and I also need to count the
number of students who actually attended the class. I can get the first one
[registered] easily, however, whenever I add another field to the query which
has a criteria, I receive a Data Mis-Match error. Obviously I'm doing
something wrong. That extra field that causes the Data Mis-Match error is:
Attended: StudentID
Count
tblLink.Attend_Status = "Attended" or "Attended-DNR"
I'm posting the query below that works.
Thanks,
Robert
Note: The following query works, giving me the number of students who
registered.
SELECT tblClasses.CourseName, tblClasses.ClassNo, tblClasses.Class_Date,
tblClasses.Class_Time, tblClasses.CourseNo, tblClasses.Class_Location,
Count(tblLink.StudentID) AS Registered
FROM tblClasses INNER JOIN tblLink ON tblClasses.ClassNo = tblLink.ClassNo
GROUP BY tblClasses.CourseName, tblClasses.ClassNo, tblClasses.Class_Date,
tblClasses.Class_Time, tblClasses.CourseNo, tblClasses.Class_Location
HAVING (((tblClasses.Class_Date)>#10/31/2006# And
(tblClasses.Class_Date)<#5/1/2007#))
ORDER BY tblClasses.Class_Date;
I'm trying to build a query that counts the number of students who
registered for our classes between two dates, and I also need to count the
number of students who actually attended the class. I can get the first one
[registered] easily, however, whenever I add another field to the query which
has a criteria, I receive a Data Mis-Match error. Obviously I'm doing
something wrong. That extra field that causes the Data Mis-Match error is:
Attended: StudentID
Count
tblLink.Attend_Status = "Attended" or "Attended-DNR"
I'm posting the query below that works.
Thanks,
Robert
Note: The following query works, giving me the number of students who
registered.
SELECT tblClasses.CourseName, tblClasses.ClassNo, tblClasses.Class_Date,
tblClasses.Class_Time, tblClasses.CourseNo, tblClasses.Class_Location,
Count(tblLink.StudentID) AS Registered
FROM tblClasses INNER JOIN tblLink ON tblClasses.ClassNo = tblLink.ClassNo
GROUP BY tblClasses.CourseName, tblClasses.ClassNo, tblClasses.Class_Date,
tblClasses.Class_Time, tblClasses.CourseNo, tblClasses.Class_Location
HAVING (((tblClasses.Class_Date)>#10/31/2006# And
(tblClasses.Class_Date)<#5/1/2007#))
ORDER BY tblClasses.Class_Date;