Need to get a list of employees that only have one timesheet complete.
We submit payroll every two weeks. So each employee has two timesheets, for each payroll period. I want to create a query that shows only those who submitted one or none yet.
Here is what I have so far.
SELECT [TimeSheet Details].[Employee Name], [TimeSheet Details].PeriodEndDate, [TimeSheet Details].WeekEndDate
FROM [TimeSheet Details]
GROUP BY [TimeSheet Details].[Employee Name], [TimeSheet Details].PeriodEndDate, [TimeSheet Details].WeekEndDate
HAVING ((([TimeSheet Details].PeriodEndDate)=[Forms]![frmCreateAdvantecUploadFile]![cboChoosePeriodEndDate]));
This is what it returns now:
Employee Name PeriodEndDate WeekEndDate
Fred 4/4/2008 3/28/2008
Fred 4/4/2008 4/4/2008
Sally 4/4/2008 3/28/2008
Susie 4/4/2008 3/28/2008
Susie 4/4/2008 4/4/2008
the modified query would show Sally as only having one.
Sally 4/4/2008 3/28/2008
I have a logins table with all employees to compare to if someone had no timesheets yet.
[Employee Name]
Fred
Sally
Susie
Matt
So Matt would show as not having any.
Any help would be appreciated
DougP
We submit payroll every two weeks. So each employee has two timesheets, for each payroll period. I want to create a query that shows only those who submitted one or none yet.
Here is what I have so far.
SELECT [TimeSheet Details].[Employee Name], [TimeSheet Details].PeriodEndDate, [TimeSheet Details].WeekEndDate
FROM [TimeSheet Details]
GROUP BY [TimeSheet Details].[Employee Name], [TimeSheet Details].PeriodEndDate, [TimeSheet Details].WeekEndDate
HAVING ((([TimeSheet Details].PeriodEndDate)=[Forms]![frmCreateAdvantecUploadFile]![cboChoosePeriodEndDate]));
This is what it returns now:
Employee Name PeriodEndDate WeekEndDate
Fred 4/4/2008 3/28/2008
Fred 4/4/2008 4/4/2008
Sally 4/4/2008 3/28/2008
Susie 4/4/2008 3/28/2008
Susie 4/4/2008 4/4/2008
the modified query would show Sally as only having one.
Sally 4/4/2008 3/28/2008
I have a logins table with all employees to compare to if someone had no timesheets yet.
[Employee Name]
Fred
Sally
Susie
Matt
So Matt would show as not having any.
Any help would be appreciated
DougP