Got it figured out, I think. A am almost home, but this is the part that killed it last time. I am lost to even start this, so here goes nothing, if JuryVacCount=>3 then GetNumWeeks()+1.
Reset GetNumWeeks() to default with when new EmployeeNumber.
What this in essense will do is allow en employee with a JuryVacCount=>3, in his 13 week period, to ignore that week and look at an extra week in its' place, in otherword, 14 weeks will realy be examined instead of the usual 13 weeks. Then when the next employee comes up the period is reset to 13 weeks, which is the default for GetNumWeeks(). I hope I made this clear enough? When this is done, I AM DONE AND OUT OF HERE and into testing. Thank you again for all of who help, I hope someone can show me the last ray of light. Here is the last part of the query:
IIf([JuryVacCount]<3,[DayCount]+[JuryVacCount], 0) AS PerfectDayCount
FROM tblEmployees AS Emp
LEFT JOIN tblAttendance AS Att
ON Emp.EmployeeNumber=Att.EmployeeNumber
WHERE (Emp.EmpStatusType="Active" And Emp.PayType="per Hour"
And (Att.DateWeekStarting Between Nz([Enter Start Date],DateAdd("ww",-1-GetNumWeeks(),Date()))
And Dateadd("ww",GetNumWeeks(),Nz([Enter Start Date],DateAdd("ww",-1-GetNumWeeks(),Date()))))
ORDER BY Att.EmployeeNumber;
Reset GetNumWeeks() to default with when new EmployeeNumber.
What this in essense will do is allow en employee with a JuryVacCount=>3, in his 13 week period, to ignore that week and look at an extra week in its' place, in otherword, 14 weeks will realy be examined instead of the usual 13 weeks. Then when the next employee comes up the period is reset to 13 weeks, which is the default for GetNumWeeks(). I hope I made this clear enough? When this is done, I AM DONE AND OUT OF HERE and into testing. Thank you again for all of who help, I hope someone can show me the last ray of light. Here is the last part of the query:
IIf([JuryVacCount]<3,[DayCount]+[JuryVacCount], 0) AS PerfectDayCount
FROM tblEmployees AS Emp
LEFT JOIN tblAttendance AS Att
ON Emp.EmployeeNumber=Att.EmployeeNumber
WHERE (Emp.EmpStatusType="Active" And Emp.PayType="per Hour"
And (Att.DateWeekStarting Between Nz([Enter Start Date],DateAdd("ww",-1-GetNumWeeks(),Date()))
And Dateadd("ww",GetNumWeeks(),Nz([Enter Start Date],DateAdd("ww",-1-GetNumWeeks(),Date()))))
ORDER BY Att.EmployeeNumber;