tractorvix
Technical User
Hi Y'all.
I'm not sure if this is possible, or if I'm overcomplicating something that should be much simpler.
I have a table which contains date and hours information. What I want to do is if the number of hours is > 35 I need it to add the first record with the orginal date and then a second record with date + 7 and hours -35. Then take the second hours field and if this is > 35 add a further record with (date + 7) + 7 and (hours-35)-35 etc
so if I have a record that is job number 1
date = 20/03/2006
hours = 150
I need it to create a record for:
jobNo Date hours
1 20/03/2006 35
1 27/03/2006 35
1 03/04/2006 35
1 10/04/2006 35
1 17/04/2006 10
I'm sure there must be a way to do this using code, but I just can't seem to get my head round it.
Any help / advice is much appreciated.
Vix
I'm not sure if this is possible, or if I'm overcomplicating something that should be much simpler.
I have a table which contains date and hours information. What I want to do is if the number of hours is > 35 I need it to add the first record with the orginal date and then a second record with date + 7 and hours -35. Then take the second hours field and if this is > 35 add a further record with (date + 7) + 7 and (hours-35)-35 etc
so if I have a record that is job number 1
date = 20/03/2006
hours = 150
I need it to create a record for:
jobNo Date hours
1 20/03/2006 35
1 27/03/2006 35
1 03/04/2006 35
1 10/04/2006 35
1 17/04/2006 10
I'm sure there must be a way to do this using code, but I just can't seem to get my head round it.
Any help / advice is much appreciated.
Vix