Click Method
Object:frmordhistory.cmdCancel
Expand/Collapse source code of procedure cmdCancel.Click Source Code
tsCommandButton::Click

*- if they checked a row in the items grid, give the
*- user the option to save items first
SELECT cItems
IF TSBaseForm::DataChanged()
	IF MESSAGEBOX(ITEMNOTSAVED_LOC, ;
		MB_ICONEXCLAMATION + MB_YESNO, ;
    	TASTRADE_LOC) == IDNO
    	GOTO THISFORM.nOrderRec IN "history"
		SELECT customer
    	RETURN
    ELSE
    	=TABLEREVERT(.T.)
		SELECT customer
    ENDIF
ENDIF
SELECT customer

RELEASE THISFORM