D
dwaynesworld
I have a query where I would like for all employee records to display for
time taken. If the employee has not taken any time off, the record should
show "0". Here is my query:
SELECT tblEmployeeTimeOff2.Instructor, Sum(Nz([Hours Taken],0)) AS [Hrs
Taken], DateDiff("d",(forms!ParamForm!StartDate),(forms!ParamForm!EndDate))+1
AS TotalDays, forms!ParamForm!StartDate AS StartDate, forms!ParamForm!EndDate
AS EndDate
FROM tblEmployeeTimeOff2
WHERE (((tblEmployeeTimeOff2.Date) Between [forms]![ParamForm]![StartDate]
And [forms]![ParamForm]![EndDate]))
GROUP BY tblEmployeeTimeOff2.Instructor,
DateDiff("d",(forms!ParamForm!StartDate),(forms!ParamForm!EndDate))+1,
forms!ParamForm!StartDate, forms!ParamForm!EndDate;
The problem that I am getting is that the results only display the employees
that have entered time off for the period. Please help as I am desperate.
Thanks
time taken. If the employee has not taken any time off, the record should
show "0". Here is my query:
SELECT tblEmployeeTimeOff2.Instructor, Sum(Nz([Hours Taken],0)) AS [Hrs
Taken], DateDiff("d",(forms!ParamForm!StartDate),(forms!ParamForm!EndDate))+1
AS TotalDays, forms!ParamForm!StartDate AS StartDate, forms!ParamForm!EndDate
AS EndDate
FROM tblEmployeeTimeOff2
WHERE (((tblEmployeeTimeOff2.Date) Between [forms]![ParamForm]![StartDate]
And [forms]![ParamForm]![EndDate]))
GROUP BY tblEmployeeTimeOff2.Instructor,
DateDiff("d",(forms!ParamForm!StartDate),(forms!ParamForm!EndDate))+1,
forms!ParamForm!StartDate, forms!ParamForm!EndDate;
The problem that I am getting is that the results only display the employees
that have entered time off for the period. Please help as I am desperate.
Thanks