Good afternoon, thank you For the quick answers under the previous posts, there were difficulties.
In OptionGroup.InteractiveChange this code works
But when I want to transfer this code to a function, problems arise with SortedData
ConnectTxtBoxCursor(ThisForm, "SortedData", @arNameTextField)
error 1924 NameCursor is not an object
Didn't find anything on google
In OptionGroup.InteractiveChange this code works
Code:
SortedData arNameTextField
FOR i = 1 TO ALEN(arNameTextField)
cTextControlSource = 'ThisForm.text' + ALLTRIM(STR(i+3));
+ '.ControlSource= ' +'"SortedData." + arNameTextField(i)'
&cTextControlSource
cLabelCaption = 'ThisForm.label' + ALLTRIM(STR(i));
+ '.Caption = ' + '(arNameTextField(i))'
&cLabelCaption
ENDFOR
But when I want to transfer this code to a function, problems arise with SortedData
ConnectTxtBoxCursor(ThisForm, "SortedData", @arNameTextField)
Code:
FUNCTION ConnectTxtBoxCursor(myForm, nameCursor, arField)
FOR i = 1 TO ALEN(arField)
cTextControlSource = 'myForm.text' + ALLTRIM(STR(i+3));
+ '.ControlSource= ' +'"nameCursor"+"." + arField(i)'
&cTextControlSource
cLabelCaption = 'myForm.label' + ALLTRIM(STR(i));
+ '.Caption = ' + '(arField(i))'
&cLabelCaption
ENDFOR
ENDFUNC
Didn't find anything on google