*---------------------- Location Section ------------------------ * Library: Aforms.vcx * Class: Dataentryform * Method: Queryunload() *----------------------- Usage Section -------------------------- *) Description: *) * Scope: Public * Parameters: *$ Usage: *$ * Returns: *--------------------- Maintenance Section ---------------------- * Change Log: * CREATED 06/07/2005 - WGB * MODIFIED *---------------------------------------------------------------- LOCAL llReturn thisform.lIsClosing = .t. if type('THISFORM.ActiveControl') = 'O' and not ; isnull(thisform.activecontrol) and PEMSTATUS(thisform.activecontrol,'valid',5) ; and inlist(lower(thisform.activecontrol.baseclass),'textbox','editbox') thisform.activecontrol.valid() endif llReturn = dodefault() thisform.lIsClosing = .f. RETURN m.llReturnIn the baseform QueryUnload there is a nodefault if the user answers Cancel:
*--------------------------------------- *--- Ask if they want to save changes *--------------------------------------- lnReply = This.AskToSave() IF lnReply = IDCANCEL OR lnReply = IDMUSTKEY *------------------------------------------- *--- Reset the nGoToPageOnCancel property *--- if it has been changed. *------------------------------------------- IF lnGoToPageOnCancel != 0 This.nGoToPageOnCancel = lnGoToPageOnCancel ENDIF NODEFAULT RETURN .F. ENDIFHow my code is going to work with the original code? Is my code OK?