>I Try to put code in a form init like this :
>
>THIS.grid1.SetAll("DynamicForeColor", ;
> "IIF(recno('mytable')=THIS.RECNUMB,rgb(255,255,0),rgb(0,0,0))", ;
> "COLUMN")
>
>***RECNUMB properties on the form, indicates mytable record changes
>
>But When I run the form, I got "Expression is invalid......."
>and if I change the code This.recnumb to thisform.recnumb, the err message never comes out.
>
>Does anyone know why ?
>
>
>TIA :)
Because this expression evaluates at runtime for the column, not for the form, and your column doesn't have RECNUMB property.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison