IF .NOT. ThisForm.AllOk() NODEFAULT RETURN .f. ENDIFIn Close button (set its propertie Cancel to .t. so If the user press ESC to its Click Event ot be fired) just set
thisform.Release() && that will not fire QueryUnload Event of the fromAnywhere else You have thiform.Release) You must change that line to:
IF thisform.QueryUnload() thisform.Release() ENDIF