I have a Yes\No data-type field included in my query. My objective is to make it show nothing (Null) if the field is null, and if it's not null, display "Yes" or "No" depending on the value. When I execute this query in the SQL window it works perfect, however when it populates my listbox it displays "No" instead of nothing if the field is Null.
Code:
SELECT tblWT.EmployeeID, tblWT.LastName, tblWT.FirstName, tblAttendance.ScheduledDate, Format([tblAttendance.ScheduledTime],"hh:nn AM/PM") AS ScheduledTime, IIf([tblAttendance.Attended] Is Not Null,IIf([tblAttendance.Attended],"Yes","No"),Null) AS HasAttended
FROM tblWT LEFT JOIN tblAttendance ON tblWT.EmployeeID = tblAttendance.EmployeeID
WHERE (((tblWT.Department)=[Forms].[frmAttendance]![cmbDepartment])) OR (((IsNull([Forms].[frmAttendance]![cmbDepartment]))<>False))
ORDER BY tblWT.LastName;