PROCEDURE BeforeRowColChange LPARAMETERS nColIndex llChangingRow = .f. WITH this oColumn = .columns(.FindColumn(nColIndex)) IF lastkey() = 145 && Ctrl+Dn, Adding new rec - self choice .nLastValidRec = .nCurrec ENDIF thisform.LockScreen = .lInGrid IF mdown() lnBottom = .top+.headerheight+.relativerow * .rowheight lnTop = lnBottom - this.rowheight lnMouseRowPos = mrow(wontop(),3) lnMouseColPos = mcol(wontop(),3) llChangingRow = !(between(lnMouseRowPos,lnTop, lnBottom) ; and between(lnMouseColPos,.left,.left+.width)) ELSE llChangingRow = inlist(lastkey(),24,5,18,3,145,148) ENDIF IF llChangingRow IF !empty(oColumn.dynamiccurrentcontrol) cCurrentControl = eval(oColumn.dynamiccurrentcontrol) ELSE cCurrentControl = oColumn.currentcontrol ENDIF WITH evaluate("oColumn."+cCurrentControl) .value = .value && So we can evaluate table ruleexpression ENDWITH oColumn = .null. IF !empty(dbgetprop(.recordsource,"Table","RuleExpression")) ; and !evaluate(dbgetprop(.recordsource,"Table","RuleExpression")) thisform.LockScreen = .F. IF messagebox(.cRevertMessage,4+16,"") = 6 TABLEREVERT(.f.,.recordsource) .recchange() ELSE NODEFAULT ENDIF ENDIF ENDIF ENDWITH ENDPROC PROCEDURE FindColumn LPARAMETERS nColIndex LOCAL ix WITH this FOR ix = 1 to .columncount IF .columns(ix).ColumnOrder = nColIndex RETURN ix ENDIF ENDFOR ENDWITH ENDPROCCetin