Gerard-
>I am setting these controls form a Parameter file and on a button on the screen (in my Base Class) I run a few lines of code as follows:
>
>lcCol = Alltrim(laGrid[lnFor,1]) && Array holds the column
>lcVar = ALLTRIM(laGrid[lnFor,2]) && Array line holds variable
>lcComm = lcCol + '.ControlSource=' + 'lcVar'
>&lcComm
>
>
>Now if lcVar has a simple field in it, it works fine
>But I've tried to get the IIF command working without success..
>If I enclose it in quotes, I just get a string out.
That's different from what you originally described. Let's suppose the following:
lcVar = 'IIF(THISFORM.OptionGroup1.VALUE = 1, "thisform.text1value" , "thisform.text2Value")'
lcComm = 'this.ControlSource=' + lcVar
&lcComm