wrightyrx7
Registered User.
- Local time
- Today, 01:52
- Joined
- Sep 4, 2014
- Messages
- 104
Hi all,
Not sure how to do this but i think i first need to find out how to loop though specific controls on my form.
Basically i am trying to produce the description that our company uses for a working pattern.
Basically the description starts with the total hours for the week followed by "_"
As an example lets say someone works:
37 hours 30 minutes a week
Monday 7 hours 30 minutes
Tuesday 7 hours 30 minutes
Wednesday 7 hours 30 minutes
Thursday 7 hours 30 minutes
Friday 7 hours 30 minutes
would be 37.30_M-F7.30
or
15 hours a week
Monday 1 hours
Tuesday 2 hours
Wednesday 3 hours
Thursday 4 hours
Friday 5 hours
would be: 15_M1T2W3TH4F5
So if there are consecutive days with the same number of hours there is a "-" with the day from and day to followed by the hours.
13 hours a week
Monday 2 hours
Tuesday 2 hours
Wednesday 3 hours
Thursday 3 hours
Friday 3 hours
would be: 13_M-T2W-F3
So i need to think of a way to loop through the below to create the description
Any help would be great
Not sure how to do this but i think i first need to find out how to loop though specific controls on my form.
Basically i am trying to produce the description that our company uses for a working pattern.
Basically the description starts with the total hours for the week followed by "_"
As an example lets say someone works:
37 hours 30 minutes a week
Monday 7 hours 30 minutes
Tuesday 7 hours 30 minutes
Wednesday 7 hours 30 minutes
Thursday 7 hours 30 minutes
Friday 7 hours 30 minutes
would be 37.30_M-F7.30
or
15 hours a week
Monday 1 hours
Tuesday 2 hours
Wednesday 3 hours
Thursday 4 hours
Friday 5 hours
would be: 15_M1T2W3TH4F5
So if there are consecutive days with the same number of hours there is a "-" with the day from and day to followed by the hours.
13 hours a week
Monday 2 hours
Tuesday 2 hours
Wednesday 3 hours
Thursday 3 hours
Friday 3 hours
would be: 13_M-T2W-F3
So i need to think of a way to loop through the below to create the description
Any help would be great

Last edited: