Hey all,
a couple years ago I asked this question and got a reply but it's no longer here and I can't find reference to it anywhere so I gotta ask for more help.
We need to be able to randomly choose a date on a calendar control, click submit, and then show all available employees working that day based on whether they are working or not on that day. Each employee is assigned a day off group number ( DOG) and there are two DOG's off every day during the week. There are also 2 fixed DOG's which are Friday Saturday, Saturday Sunday and Sunday Monday. Everyone else only works 4 days then they are off 2. So the following day off groups exist and one is assigned to everyone:
61,62,63,64,65,66 (work 4 days on off 2)
8,9,10 - 8= Sat/Sun off, 9= Fri/Sat off, 10=Sun/Mon off.
for the 60 series DOG's the following is true:
on 01-JAN-2012 DOG's 61 & 62 are off.
on 02-JAN-2012 DOG's 62 & 63 are off
on 03-JAN-2012 DOG's 63 & 64 are off.
on 04-JAN-2012 DOG's 64 & 65 are off
on 05-JAN-2012 DOG's 65 & 66 are off.
on 06-JAN-2012 DOG's 66 & 61 are off
Then on 07-JAN-2012 we're back at 61 & 62 off.
Additionally on every FRIDAY, the additional DOG 9 is added to the other two DOGs.
Every SATURDAY contains it's 2 60 series DOG's as well as 8 and 9 because they have fixed days off.
Every Sunday contains it's 2 60 series DOG's as well as 8 & 10 fixed day off folks.
So I need something that inspects the calendar control value selected, finds the (2) 60 series DOG for that day and also checks to see if the weekday is a FRI,SAT,SUN,MON and add the relevant fixed DOG's of 8,9 and 10 to the 60 series DOG.
Every Friday will have 3 total DOG, 2 60's and 9
Every Saturday will have 4 total DOG, 2 60's plus 8&9
Every Sunday will have 4 total DOG, 2 60's plus 8&10
Every Monday will have 3 total DOG, 2 60's and 10
Hope that makes sense. The last time this was done I believe we used a module looping through recordsets, adding a 1 to 6 to create 61-66 and assigning it to the day as well as checking the Weekday to add 8,9 or 10 to the DOG's off on that day.
I just for the life of me can't recall how it was all put together.
Any help is greatly appreciated
a couple years ago I asked this question and got a reply but it's no longer here and I can't find reference to it anywhere so I gotta ask for more help.
We need to be able to randomly choose a date on a calendar control, click submit, and then show all available employees working that day based on whether they are working or not on that day. Each employee is assigned a day off group number ( DOG) and there are two DOG's off every day during the week. There are also 2 fixed DOG's which are Friday Saturday, Saturday Sunday and Sunday Monday. Everyone else only works 4 days then they are off 2. So the following day off groups exist and one is assigned to everyone:
61,62,63,64,65,66 (work 4 days on off 2)
8,9,10 - 8= Sat/Sun off, 9= Fri/Sat off, 10=Sun/Mon off.
for the 60 series DOG's the following is true:
on 01-JAN-2012 DOG's 61 & 62 are off.
on 02-JAN-2012 DOG's 62 & 63 are off
on 03-JAN-2012 DOG's 63 & 64 are off.
on 04-JAN-2012 DOG's 64 & 65 are off
on 05-JAN-2012 DOG's 65 & 66 are off.
on 06-JAN-2012 DOG's 66 & 61 are off
Then on 07-JAN-2012 we're back at 61 & 62 off.
Additionally on every FRIDAY, the additional DOG 9 is added to the other two DOGs.
Every SATURDAY contains it's 2 60 series DOG's as well as 8 and 9 because they have fixed days off.
Every Sunday contains it's 2 60 series DOG's as well as 8 & 10 fixed day off folks.
So I need something that inspects the calendar control value selected, finds the (2) 60 series DOG for that day and also checks to see if the weekday is a FRI,SAT,SUN,MON and add the relevant fixed DOG's of 8,9 and 10 to the 60 series DOG.
Every Friday will have 3 total DOG, 2 60's and 9
Every Saturday will have 4 total DOG, 2 60's plus 8&9
Every Sunday will have 4 total DOG, 2 60's plus 8&10
Every Monday will have 3 total DOG, 2 60's and 10
Hope that makes sense. The last time this was done I believe we used a module looping through recordsets, adding a 1 to 6 to create 61-66 and assigning it to the day as well as checking the Weekday to add 8,9 or 10 to the DOG's off on that day.
I just for the life of me can't recall how it was all put together.
Any help is greatly appreciated