PROCEDURE object.Valid DO CASE CASE m.thisform.ReleaseType=0 && Form internal Valid CASE m.thisform.ReleaseType=1 && Form menu or X close OTHERWISE && Quit FoxPro ENDPROC * Valid no fire if you release the form with * form.release or set null to linked varFabio