thisform.release _screen.activeform.release if _screen.activeform.caption="form1" messagebox ("form1") endif if _screen.activeform.caption="form2" messagebox ("form2") endif do form form3thisform.release is supposed to release form2 and _screen.activeform.release is supposed to release form1. the code that follows is only to check what form is still active.