I am trying to trap my Cancel button event during a Get - Valid scenario .. Here is the code
Code: Select all | Expand
Static lClose := nil
..
REDEFINE GET oClname VAR cClname ID 120 of oREQ PICTURE "@!" ;
valid CustGet(cClname, cMODE, oRsReq, oButt1,oButt2,oButt3,oButt4, "1") UPDATE
...
...
...
REDEFINE BTNBMP oBUTT2 ID 112 of oREQ ; // cancel
RESOURCE "CANCEL1","DCANCEL1","DCANCEL1" ;
PROMPT "&Cancel " LEFT 2007;
ACTION ( lClose := .t.,lOK := .F., oREQ:END() )
//----------------------------------
Static Func CUSTGET( cNAME, cMODE, oRsReq, oButt1,oButt2,oButt3,oButt4, cWhere )
LOCAL oDLG,oLBX, oRsCust, cSQL, oERR, oCol
LOCAL oBTN1,oBTN2,oBTN3,lOK,oBrush
msginfo( lclose )
As you can see from the screen shot .. the valid fires before the lclose variable is initialized and I can not seem to trap the event and return(.t.) from the valid ..
Thanks
Rick Lipkin
![Image](http://img830.imageshack.us/img830/1015/validg.jpg)