Hello,
I have the ms access database which I use to assign overtime to employee.
One tbl One 'Overtime Lines' Fields: Line No, Date, Start Time, End Time.
Tbl Two 'Employee List' Fields: Employee name, Emp ID, Seniority No.
Tbl three 'Overtime Signups Employee Name, Overtime Line number, Qualifications’ , Location
Employee signup a week in advance by selecting overtime line number on line. Employees are allowed to signup all the lines. This line timings can be overlapping such as
Start Time End Time
0500 0900
0600 1000
0700 1000 etc.
This can go to over 2000 records.
We pull signup every Week and upload it to access Signup tbl.
I have created a form to approve this overtime. We are only adding location (date, start time and end time is already pre populated) to mark as overtime is approved. using this form. (All the fields in the form are from same tbl)
When approver of OT approves a slot by adding only location as approved (Start and End Time are pre populated in the form) , next time when approver approves another slot for the same employee by adding location, which is overlapping with previously approved line (Added Location).
Problem I am facing is I am not entering Start and End time so can’t put the code to initiate the conflict message.
Soon he / She enters the location.
I want code or query to check current pre-populated Start time and End time with previous start and time for any conflict which is related to Location. If there is no conflict (No Record with location added) it should except the location, if there is a conflict I want to delete the location and pop the message that there is a conflict and goes to next record.
Do I have to create new table? Because after all the overtime slots are approved. Query is generating approved OT in a PDF format report with Employee name, Date of OT he is approved and Time of OT he is approved for.
So What I am looking for is What I can do from preventing user to add location if the previous time is conflicting with new approval. SO program should check five things, Employee, Date, Start Time, End Time, and Location is blank or not.
I have added code in Query to check Start Time, EndTime, Employee Name, and Overtime line number by adding two copies of the same table. But it is not working because I already have the data in the table that is prepopulated in advance. so when I use this code in a form control to add record after just adding location it just comes up with the message because it is only checking for date time and employee name.
I have been trying for long time and can't just let it go. Please help me understand and point me to right direcion.
I will be greatful.
Thank you,
I have the ms access database which I use to assign overtime to employee.
One tbl One 'Overtime Lines' Fields: Line No, Date, Start Time, End Time.
Tbl Two 'Employee List' Fields: Employee name, Emp ID, Seniority No.
Tbl three 'Overtime Signups Employee Name, Overtime Line number, Qualifications’ , Location
Employee signup a week in advance by selecting overtime line number on line. Employees are allowed to signup all the lines. This line timings can be overlapping such as
Start Time End Time
0500 0900
0600 1000
0700 1000 etc.
This can go to over 2000 records.
We pull signup every Week and upload it to access Signup tbl.
I have created a form to approve this overtime. We are only adding location (date, start time and end time is already pre populated) to mark as overtime is approved. using this form. (All the fields in the form are from same tbl)
When approver of OT approves a slot by adding only location as approved (Start and End Time are pre populated in the form) , next time when approver approves another slot for the same employee by adding location, which is overlapping with previously approved line (Added Location).
Problem I am facing is I am not entering Start and End time so can’t put the code to initiate the conflict message.
Soon he / She enters the location.
I want code or query to check current pre-populated Start time and End time with previous start and time for any conflict which is related to Location. If there is no conflict (No Record with location added) it should except the location, if there is a conflict I want to delete the location and pop the message that there is a conflict and goes to next record.
Do I have to create new table? Because after all the overtime slots are approved. Query is generating approved OT in a PDF format report with Employee name, Date of OT he is approved and Time of OT he is approved for.
So What I am looking for is What I can do from preventing user to add location if the previous time is conflicting with new approval. SO program should check five things, Employee, Date, Start Time, End Time, and Location is blank or not.
I have added code in Query to check Start Time, EndTime, Employee Name, and Overtime line number by adding two copies of the same table. But it is not working because I already have the data in the table that is prepopulated in advance. so when I use this code in a form control to add record after just adding location it just comes up with the message because it is only checking for date time and employee name.
I have been trying for long time and can't just let it go. Please help me understand and point me to right direcion.
I will be greatful.
Thank you,
Comment