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 )
ENDIF
*** Finished with validation...reset flag
.lValidatingRow = .F.
ENDIF
ENDWITH