******************************************************************** * Description.......: CancelValidation * Calling Samples...: * Parameter List....: * Created by........: John Koziol * Modified by.......: ******************************************************************** local nCancelTop,nCancelHeight,nCancelLeft,nCancelWidth, llReturn nCancelTop=thisform.cmdCancel.top nCancelBottom=m.nCancelTop+thisform.cmdCancel.height nCancelLeft=thisform.cmdCancel.left nCancelRight=m.nCancelLeft+thisform.cmdCancel.width llReturn = .f. if between(mrow(thisform.name,3),m.nCancelTop,m.nCancelBottom) and ; between(mcol(thisform.name,3),m.nCancelLeft,m.nCancelRight) and ; mdown() llReturn = .t. endif return m.llReturn or lastkey()= 46 && Alt+C (shortcut for Cancel)Is there a way to make this more generic (e.g. find out key combination for Cancel button automatically)?