******************************************************************** * Description.......: AfterRowColChange * Calling Samples...: * Parameter List....: * Created by........: Marcia Akins * Modified by.......: ******************************************************************** lparameters ncolindex 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 # m.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 dodefault(m.ncolindex)
*!* ******************************************************************** *!* * Description.......: BeforeRowColChange *!* * Calling Samples...: *!* * Parameter List....: *!* * Created by........: Marcia Akins *!* * Modified by.......: *!* ******************************************************************** lparameters ncolindex with this if .lValidatingRow nodefault else .nRec2Validate = recno(.recordsource) dodefault(m.ncolindex) endif endwithYou would need two new properties nRec2Validate and lValidatingRow.