Luigi
Multe grazies
That works a treat. I suppose putting it in the form's refresh was what I was missing (I had considered the storing the RECNO() etc.). The grid maintains the row's dynamic colour after moving to the next grid so that's fine.
Now, as I've colour-coded the key fields in my grid, I've just got to adapt the code so only the other columns change colour.
Ciao
Terry
>Terry
>
>in AfterRowChangeEvent of the grid
>
>
>thisrecord= recno()
>select PXENTRYCODES
>replace all PXENTRYCODES.lSELECTED with .f.
>goto thisrecord
>replace PXENTRYCODES.lSELECTED with .t.
>thisform.refresh
>
>
>when you click with mouse on a row it will be selected
>
>in the refresh method of the form
>
>
>thisform.grid1.setall( "dynamicbackcolor", "IIF( PXENTRYCODES.lSELECTED = .F., RGB( 255, 255, 255), RGB( 255,255,128))", "Column")
>
>
>
>Luigi
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.