nRecNo is going out of scope and not available. Save the record number to a property on the form and use it.
>I get the below mentioned error message when i used this
>
>nRecNo = RECNO( Thisform.grid1.RecordSource )
>Thisform.grid1.SetAll('DynamicBackColor', ;
>'IIF(RECNO(Thisform.grid1.RecordSource) = nRecNo, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
>
>
>Microsoft Visual FoxPro
>OK ,Cancel
>Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property.
>
>what's wrong in this.
>
>txs
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer