IF thisform.StopMe NODEFAULT ENDIFHere's an example form:
oX = CREATEOBJECT("stopme") oX.Show(1) DEFINE CLASS stopme as Form StopMe = .f. ADD OBJECT pgf1 as mypageframe WITH Visible=.T. ENDDEFINE DEFINE CLASS mypageframe as PageFrame ADD OBJECT Page1 AS mypage ADD OBJECT Page2 AS page ENDDEFINE DEFINE CLASS mypage as Page ADD OBJECT cmd1 AS mycommandbutton WITH ; Height = 25, ; Width = 100, ; Left = 100, ; Top = 100, ; Caption = "Page 2 Allowed" FUNCTION Deactivate IF thisform.StopMe NODEFAULT ENDIF ENDFUNC ENDDEFINE DEFINE CLASS mycommandbutton as CommandButton FUNCTION Click thisform.StopMe = NOT thisform.StopMe this.Caption = IIF(thisform.StopMe, "Stop Page2","Page2 Allowed") ENDFUNC ENDDEFINE