Here is my dilemma.
I have created an attendance DB which works great for single event entries. But I was approached today and was asked what if the employee takes a week off? That would mean 7 seperate entries would need to be made in the DB. Currently, users fill out a form which then appends the date to a table. There is one date field "DateofOccurence" and I am thinking I would need to add two additional field "Start Date" and "End Date" to the form and tables. In essence, the supervisor would have the option of entering a single Date in the field "DateofOccurrence" for single events or option(2) using the Start and End date for events other than a single occurrence.
How would i create a query that will take a single record (if the start and end dates option is used) and create multiple records Here is my example:
Table1
EmployeeID, FullName, Code, DateOfOccurrence, StarDate, EndDate, Remarks
2334, JohnDoe, PTO, 7/1/13/, 7/7/13, out sick.
Append the data to Table2 whereby the start and end dates are inserted into the DateofOccurrence field.
Table2
EmployeeID, FullName, Code, DateOfOccurrence, StartDate, EndDate, Remarks
2334, JohnDoe, PTO, 7/1/13, Out Sick.
2334, JohnDoe, PTO, 7/2/13, Out Sick.
2334, JohnDoe, PTO, 7/3/13, Out Sick.
2334, JohnDoe, PTO, 7/4/13, Out Sick.
and so on...
Any suggestions you can provide is very much appreciated.
Thank you in advance!
I have created an attendance DB which works great for single event entries. But I was approached today and was asked what if the employee takes a week off? That would mean 7 seperate entries would need to be made in the DB. Currently, users fill out a form which then appends the date to a table. There is one date field "DateofOccurence" and I am thinking I would need to add two additional field "Start Date" and "End Date" to the form and tables. In essence, the supervisor would have the option of entering a single Date in the field "DateofOccurrence" for single events or option(2) using the Start and End date for events other than a single occurrence.
How would i create a query that will take a single record (if the start and end dates option is used) and create multiple records Here is my example:
Table1
EmployeeID, FullName, Code, DateOfOccurrence, StarDate, EndDate, Remarks
2334, JohnDoe, PTO, 7/1/13/, 7/7/13, out sick.
Append the data to Table2 whereby the start and end dates are inserted into the DateofOccurrence field.
Table2
EmployeeID, FullName, Code, DateOfOccurrence, StartDate, EndDate, Remarks
2334, JohnDoe, PTO, 7/1/13, Out Sick.
2334, JohnDoe, PTO, 7/2/13, Out Sick.
2334, JohnDoe, PTO, 7/3/13, Out Sick.
2334, JohnDoe, PTO, 7/4/13, Out Sick.
and so on...
Any suggestions you can provide is very much appreciated.
Thank you in advance!