Determine Worker Present at work at current time

SFGiants21256

New Member
Joined
Apr 12, 2012
Messages
25
Hello,

I should start out that I am very very new with access. I've done some VBA in excel but it is nothing extensive.

I'm trying to create a tracker to tell me what employees are present for work at a specific time (the current time I run the query). We are working 6 days a week at 12 hours each shift. I've been able to get the query to filter out people who have the same off day as the current day. The issue I'm having is when someone is off Tuesday at 2300 until Wednesday at 1100. Whenever I crossover midnight I'm messing myself up because then the day of the week is useless. So that is where the time comes into play. I'm trying to build two query's. One which will list everyone present for work and the other will list everyone off. The hardest thing is there are some people who are only taking 6 hours off instead of a full 12 hour shift. The first row in the example below shows this.

Using the example below, if it was 10:00am on Sunday then there should be 3 people off shift. If it was 2:00pm on Sunday it should now be 2 people.

To get the query to filter out the people off on the particular day I used the following formula in the "Criteria" section of the design query:
<>Format(Weekday(Date()),"dddd")
Shift Start
Shift End
Off Start
Off End
DAY OFF START
DAY OFF END
6:30
18:30
6:30
12:30
Sunday
Sunday
6:30
18:30
6:30
12:30
Saturday
Saturday
9:00
18:00
9:00
18:00
Wednesday
Wednesday
6:00
18:00
6:00
18:00
Monday
Monday
6:00
18:00
6:00
18:00
Thursday
Thursday
6:00
18:00
6:00
18:00
Sunday
Sunday
6:00
18:00
6:00
18:00
Sunday
Sunday
12:30
0:30
12:30
0:30
Friday
Saturday
12:30
0:30
12:30
0:30
Friday
Saturday
12:30
0:30
12:30
0:30
Sunday
Monday
18:30
6:30
18:30
22:00
Sunday
Sunday
18:30
6:30
18:30
0:30
Tuesday
Wednesday
18:00
3:00
18:00
3:00
Tuesday
Wednesday
18:00
6:00
18:00
6:00
Friday
Saturday
18:00
6:00
18:00
6:00
Saturday
Sunday
18:00
6:00
18:00
6:00
Friday
Saturday
0:30
12:30
0:30
12:30
Monday
Monday
0:30
12:30
0:30
12:30
Tuesday
Tuesday
0:30
12:30
0:30
12:30
Wednesday
Wednesday

<tbody>
</tbody>



Any advice is greatly appreciated. Thank you.
 
Consider uploading a zipped copy of the db. Between that at the info you posted, I might be able to help. No doubt you fully grasp the process and what results you want, but I'm afraid I can't as I don't see what you're dealing with.
Never mind - I came back only to see that you can't upload files, apparently. If you are willing to upload somewhere, I am active on AccessForums.net where you might get more Access related help anyway. They allow uploads. You could send me a PM there so I will know you have posted should you decide to.
 
Last edited:
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top