>>Thank you Fred. That works if write code in Form designer. But I describe controlsource in Init method of Form. And after using your code I get following error: “Variable “Payment” not found”.
>
>Be sure you have your quotes correct:
>
>oForm.oGrid.ColumnX=
'IIF(table.field1=1,
"Payment
",IIF(table.field1=2,
"Fine
",
"Other
"))
'>
>You can also use "[" & "]" at the begining and end if that helps.
>oForm.oGrid.ColumnX=[IIF(table.field1=1,"Payment",IIF(table.field1=2,"Fine","Other"))]
Doh!
That should be oForm.oGGrid.ColumnX
.ControlsourceSorry about that!