I have a form called “RenewalForm” with a text box called “Agreement” that contains a string. The string represents an agreement/contract which is given a number when it is created (ex: 01, 02, 03, etc). These agreements are renewed from time to time and when one gets renewed, the letter "R" needs to be placed behind the agreement number (ex: 01R, 02R, 03R, etc). The next time the agreement gets renewed, the number "2" needs to be placed behind the "R" (ex: 01R2, 02R2, 03R2, etc). Now, each time the agreement is renewed, the number after the "R" needs to be incremented by one (ex: 01R3, 01R4, 01R5, etc). Starting from the beginning the agreements go something like this:
01
01R
01R2
01R3
01R4
Etc.
Sometimes these agreements are combined and they are separated by a dash. Some examples are:
01-02R
03R-04R-05R
01R-02R2
01R-02R3-03
It could be any combination.
The original agreement number that is before the “R” will never change (01, 02, 03, etc). The only changes to the string will be either adding an “R” for the first renewal and after that, only the number after the R will change.
When it comes time for the agreement(s) to be renewed, these are the changes that need to be made to the string:
1)If the string is just a number like “01” then I want to place an “R” behind the one to show that it has been renewed for the first time like this: 01R
2)If the string is “01R” then I want it to place a “2” behind the “R” to show that it has been renewed for the second time like this: 01R2 (Each time it is renewed after the second time, the number after the R will need to be incremented by one like this: 01R3, 01R4, 01R5, etc)
3)If several agreements have been combined it will be a string with the dashes like "01-02R3-03R" where each section separated by the "-" needs to be renewed like this: "01R-02R4-03R2"
Here is what changed:
“01” to “01R”
“02R3” to “02R4”
“03R” to “03R2”
The new string will be "01R-02R4-03R2"
I have a button on the “RenewalForm” for the user to click when the agreement needs to be renewed. This button opens another form called "RenewalFormSte p2RENEW". In the On Click event for the button, I want it to get the string in the text box “Agreement” on the form “RenewalForm” and renew it like I explained above and then place the renewed agreement number in a text box called “NewAgreement” on the form "RenewalFormSte p2RENEW"
Thank you very much in advance for you help!
mlstewart
01
01R
01R2
01R3
01R4
Etc.
Sometimes these agreements are combined and they are separated by a dash. Some examples are:
01-02R
03R-04R-05R
01R-02R2
01R-02R3-03
It could be any combination.
The original agreement number that is before the “R” will never change (01, 02, 03, etc). The only changes to the string will be either adding an “R” for the first renewal and after that, only the number after the R will change.
When it comes time for the agreement(s) to be renewed, these are the changes that need to be made to the string:
1)If the string is just a number like “01” then I want to place an “R” behind the one to show that it has been renewed for the first time like this: 01R
2)If the string is “01R” then I want it to place a “2” behind the “R” to show that it has been renewed for the second time like this: 01R2 (Each time it is renewed after the second time, the number after the R will need to be incremented by one like this: 01R3, 01R4, 01R5, etc)
3)If several agreements have been combined it will be a string with the dashes like "01-02R3-03R" where each section separated by the "-" needs to be renewed like this: "01R-02R4-03R2"
Here is what changed:
“01” to “01R”
“02R3” to “02R4”
“03R” to “03R2”
The new string will be "01R-02R4-03R2"
I have a button on the “RenewalForm” for the user to click when the agreement needs to be renewed. This button opens another form called "RenewalFormSte p2RENEW". In the On Click event for the button, I want it to get the string in the text box “Agreement” on the form “RenewalForm” and renew it like I explained above and then place the renewed agreement number in a text box called “NewAgreement” on the form "RenewalFormSte p2RENEW"
Thank you very much in advance for you help!
mlstewart
Comment