sherlocked
Registered User.
- Local time
- Today, 15:35
- Joined
- Sep 22, 2014
- Messages
- 125
Hello experts,
I am attempting to write a query that will allow a user to select a particular class from a dropdown list and check to see who HAS NOT attended the class.
I have two tables, tblEmployees and tblAttendance. The linked field is EmpNo.
Below is what I have come up so far but I get no results in my query even though I know there are folks who have not attended the class.
What am I doing wrong? Your assistance as always is appreciated
I am attempting to write a query that will allow a user to select a particular class from a dropdown list and check to see who HAS NOT attended the class.
I have two tables, tblEmployees and tblAttendance. The linked field is EmpNo.
Below is what I have come up so far but I get no results in my query even though I know there are folks who have not attended the class.
What am I doing wrong? Your assistance as always is appreciated
Code:
SELECT tblEmployees.EmpNo, tblAttendance.ClassDate, tblAttendance.ClassName
FROM tblEmployees LEFT JOIN tblAttendance ON tblEmployees.EmpNo = tblAttendance.EmpNo
WHERE (((tblAttendance.EmpNo) Is Null) AND ((tblAttendance.ClassName)="CLASS NAME FROM DROPDOWN HERE"));