Thank Marcia
I put the code in the Init of the grid after doing a DODEFAULT(), is that okay?
>
Error #: 5
>Message: Record is out of range.
>Line #: 20
>Code: GOTO .nRec2Validate IN ( .RECORDSOURCE )
>Method: afterrowcolchange
>Object: frmtjv1.pgf.grdCr>
>Oooh, I'm so embarrassed. It looks like sloppy programming on my part. What you need is a check to make sure that .nRec2Validate is a valid record number.
>
>What you need to do is add some code when the grid is instantiated to initialize the .nRec2Validate properly:
>
>
>IF EOF( This.RecordSource ) OR This.nRec2Validate > RECCOUNT( This.RecordSource )
> This.nRec2Validate = 0
>ENDIF
>
>
>I assume that there is a check for nRec2Validate > 0 in the AfterRowColChange method. At least there was in the code for the book.