Spread time across specific records
Posted on 2008-10-29
I have a time entry database and I need the ability to be able to spread time across selected records.
Let's say I have entered the time for an employee and they spent 10 hours working on 6 tasks, I'd like to spread that time evenly across all records that have a null value for the hour field. Additionally, I need the hours rounded up or down for each record to the closest .5 hours, with the difference being made up on the last records. I would activate this using a cmd. button.
For example, the above scenario would average out to 1.667 hours each. I'd like to break it down to 2, 2, 2, 2, 1, 1, or something similar.
The form name is subfrmTimeRecord
The relevant fields are trEmployeeNumber, trPhase, trCostCode, trHours.
Basically, The subform is queried based on the employee number, and I need to spread the hours only across each null value in the hours field. I may have other time entered for this employee already.