******************************************************************** * Description.......: CancelValidation * Calling Samples...: * Parameter List....: * Created by........: ideas by John Koziol /Cetin Basoz * Modified by.......: NN ******************************************************************** local llReturn, loObject loObject = SYS(1270) && Object under mouse IF VARTYPE(m.loObject) = "O" llReturn = lower(justext(sys(1272, m.loObject))) = "cmdcancel" and mdown() ELSE llReturn = .f. endif return m.llReturn or lastkey()= 46 or thisform.releasetype = 1 && Alt+C (shortcut for Cancel)In the textbox.valid
local llReturn llReturn = .t. if not thisform.CancelValidation() ** Proceed with normal validation logic endif