employee duty work database (1 Viewer)

carl024

Registered User.
Local time
Today, 04:40
Joined
Nov 21, 2011
Messages
48
i need to make a shift work employee database

* employee work in two shift daily day and night 8 hour(7:00 am to3:00 pm) and (3:00pm to 11:00pm)
* 04 employee in depart
* 02 person in day shift
* 02 person in night shift
* shift change after 07 day every week
* night person rotate to day
* day person rotate to night
* i make some schedule style but not satisfy me
schedule
eno-----enmame---shift
01------carl-----day
02------tania----day
03------melsi----night
04------david----night

daily entry table
cur_date
eno
ename
shift
pay_rate

how to make a best shedule to apply month
make daily employee data entry to schedule wise
 

apr pillai

AWF VIP
Local time
Today, 17:10
Joined
Jan 20, 2005
Messages
735
A sample database (ShiftDuty.accdb) is attached.

There are three tables:
1. Shift_EmpList (Master employees table)
2. Shift_DutyRecords (Daily Shift Schedule records)
3. Shift_Param (Keeps next due date for shift change)

VBA Function: ShiftDuty() - Runs automatically from the Autoexec macro when the database is open (every time). Checks for the shift change due-date in the Shift_Param Table and does the following actions if it encountered the shift change due-date:

a) Rotates the Shift change in the Shift_EmpList Master Records.
b) Uses the Shift_EmpList records to generate daily duty records and adds them to the Shift_DutyRecords Table.
c) Updates the Shift_Param Table with the next shift change due date.

Note:
1. You may take a look at the existing sample records in the Shift_DutyRecords and delete them.
2. Update the Shift_EmpList Table with correct Data manually first time or whenever change become necessary.
3. Enter the Shift_Param table with the next shift change due Date. You need to do this only once. After that the program will update it after every 7 days interval, after generating day-wise Shift_DutyRecords.
4. Remove the character X at the end of the Macro name AutoexecX to make it to read as Autoexec.
5. You may close the Database and open it. But, remember the Day-Shift (D) records will change to Night_Shift (N) with shift time and pay_rate in the Shift_EmpList (i.e. Day shift people will be put in Night Shift, existing night shift will change to day shift).

You may Design Forms as per your requirements.
Good luck.
 

Attachments

  • ShiftDuty.accdb
    452 KB · Views: 1,462

gus70

New member
Local time
Today, 04:40
Joined
Aug 30, 2017
Messages
1
Sir,

What an amazing piece of code!!!
I've looking for this for so long!
I am a military and this could help me and a lot of lads too!

I tried to edit the code so it could:

- cover a 24 hour duty lenght (3 shifts per day)
- Morning (M): 07:00 - 15:00
- Afternoon (A): 15:00 - 23:00
- Night (N): 23:00 - 07:00

- Keep the shifts history (meaning: in table Shift_DutyRecords, I'd like to keep all the generated data. This way, I can go there and view old shifts)

- And for last, an employee absence feature (right now there's only a combo option list. Having the ability to create a leave period where you could set an absence period where employees are not available for duty so it could pass on to next available employee.

Could you please help, sadly my VBA and SQL knowledge is not enough to build the code.

Thank you!
 
Last edited:

CHITTA

New member
Local time
Today, 17:10
Joined
Aug 21, 2020
Messages
1
You are Great, I am sending herewith a GRAND SALUTE 🙏 FOR you.
 

Users who are viewing this thread

Top Bottom