>Thank you, Mike and Andrew. But I got another problem.
>
>Why I can't use 'iif(this.text1.value='A',.T.,.F.)'
>instead of 'iif(myfield='A',.T.,.F.)'?
>I got an illegal expression error message when used 'this.text1.value' instead.
>
>Sunny
I believe the reason is that the Grid is what "this" is actually refering to at the time the IIF is evaluated. You could try using this.ColumnX.Text1.Value and see if that works.
>
>>>Did you use dynamicfontItalic property?
>>>I tried this command:
>>>thisform.grid1.column1.dynamicfontItalic=iif(myfield='A',.T.,.F.)
>>>I got an error.
>>
>>What error? This should work, but it will only evaluate for one record and use that on every field. Use this instead:
>>
>>
thisform.grid1.column1.dynamicfontItalic = "iif(myfield='A',.T.,.F.)"