with This if not .AddQueryUnload() NoDefault return endif if type(".lCanceled") = "L" if .lCanceled .RevertTables() else .UpdateTables() endif else .UpdateTables() endif .Release() endwithMy Form class has a property, lCanceled that is always set to false. My Cancel button sets that property it to True if clicked. My Cancel and Exit buttons then call the form's QueryUnload. So if the user clicks the form X or the VFP app X buttons all shutdowns according to Hoyle.