*-------------------------------------------------------------------------- * -- Close form *-------------------------------------------------------------------------- *-------------------------------------------------------------------------- * -- NSL 3/3/00 Implementation of requested class changes * -- Always have the close button enabled, and do a tableupdate()if changes have been made. * -- Note: We could have called the edit/add to do the revert/update, but we were in the for loop anyway *-------------------------------------------------------------------------- IF thisform.lprocessform lnoldrec = RECNO((THISFORM.DATAENVIRONMENT.INITIALSELECTEDALIAS)) Local lnModified,lresp lresp=0 FOR i=1 TO THISFORM.numopen SELECT (THISFORM.laDE[i,1]) IF CURSORGETPROP("Buffering") >3 && NSL 3/3/00 Must be table buffering to save * -- If a table has been modified, then need to ask the user whether to save or revert lnModified=GetNextModified(0) IF lnModified<>0 and lresp=0 lresp=messagebox('Do you want to save changes?',36) &&+32 ENDIF IF lresp=7 && User requested that changes not be saved. =TABLEREVERT(.T.,THISFORM.laDE[i,1]) ELSE =TABLEUPDATE(.T.,.T.) ENDIF ENDIF ENDFOR SELECT (THISFORM.DATAENVIRONMENT.INITIALSELECTEDALIAS) IF BETWEEN(lnoldrec,1,RECCOUNT()) GOTO lnoldrec ENDIF ENDIF * -- 3/3/00 End of changes THISFORM.RELEASE()Thanks in advance.