CharlieT302
Instructor
Hello Everyone,
I need to be able to set value of an unbound control using a concatenation formula.
I have a calendar form with 42 unbound controls named as such: M0, M1, M2, M3, and so forth.
Out of the first seven controls (M0 thru M6), one of them will begin with the number 1; as determined by a formula. A separate unbound box (called Start_Num) stores the "name" of the control (less the 'M' designation) whose value is 1.
Example:
Start_Num = 5 (which is control name: M5 less the letter).
All I want to do is set the following controls with the next sequential value, so that M6 = 2, and M7 = 3, and so on.
As a test, I used a simple formula to navigate to the next control:
DoCmd.GoToControl "M" & Me.Start_Num + 1 (this moves to M6. In other words: M & (5 + 1)
This works fine. Note: this was just a test. I do not need to move to the control.
I just need a similar way to set the value of the next control so that:
"M"& me.Start_Num + 1 = 2
"M"& me.Start_Num + 2 = 3
etc.
Ideas?
I need to be able to set value of an unbound control using a concatenation formula.
I have a calendar form with 42 unbound controls named as such: M0, M1, M2, M3, and so forth.
Out of the first seven controls (M0 thru M6), one of them will begin with the number 1; as determined by a formula. A separate unbound box (called Start_Num) stores the "name" of the control (less the 'M' designation) whose value is 1.
Example:
Start_Num = 5 (which is control name: M5 less the letter).
All I want to do is set the following controls with the next sequential value, so that M6 = 2, and M7 = 3, and so on.
As a test, I used a simple formula to navigate to the next control:
DoCmd.GoToControl "M" & Me.Start_Num + 1 (this moves to M6. In other words: M & (5 + 1)
This works fine. Note: this was just a test. I do not need to move to the control.
I just need a similar way to set the value of the next control so that:
"M"& me.Start_Num + 1 = 2
"M"& me.Start_Num + 2 = 3
etc.
Ideas?