WITH This IF .lValidatingRow NODEFAULT ELSE .nRec2Validate = RECNO(.RecordSource) ENDIF ENDWITHThis code in AfterRowColChange:
LOCAL lnRec2GoTo WITH This *** If there is no record to validate, exit stage left IF .nRec2Validate = 0 RETURN ENDIF *** Save the current record number in case we have changed rows lnRec2GoTo = RECNO( .RecordSource ) *** Check to see if the row has changed IF .nRec2Validate # lnRec2GoTo *** We are validating the row we are attempting to leave...set the flag .lValidatingRow = .T. *** Return to the record we just left GOTO .nRec2Validate IN ( .RecordSource ) *** If it checks out, let the user move to the new row IF .ValidateCurrentRow() GOTO lnRec2GoTo IN ( .RecordSource ) .RefreshControls() ENDIF *** Finished with validation...reset flag .lValidatingRow = .F. ENDIF ENDWITHRefreshControls is a template method that my base class grid has. I use it to refresh dependent controls on the form.