DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How close all forms?

  1. #1
    Join Date
    Feb 2001
    Posts
    35
    I open 1st form wih parameter:

    ifrun32.exe form.fmx param=1

    From this for using CALL_FORM I open another
    Then using OPEN_FORM I open one more form
    Then i want to go to 1st form and close all forms except 1st
    How to do it?


    If i'll make exit_form i will be in the 2nd

  2. #2
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    forms do NOT allow this. A time-honoured solution is : when you exit from the third form, put a 'TRUE' value in a global var, and in the When-New-Form-Instance of the secound form write :

    IF global.var = 'TRUE' then
    exit_form;
    END IF;

    This way, the secound form will go up, but imediatly the WNFI trigger fires and exits.

    ALL the forms in your app must be the When-New_Form_Instance trigger, and the global var must be declared in the firs one.

    []s
    Chiappa

  3. #3
    Join Date
    Feb 2001
    Posts
    35
    But this trigger doesn't eork if you return to form

  4. #4
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    depending in the version of the Forms and the environment, some triggers don´t fire when returning from a called forms, just try and check to yours (the technique works, I made this some times). For example, in my machine (client server env, NT 4.0 SP6, Forms 4.5) I just did :
    PROG1 is the master, in Pre-Form I wrote :
    :global.form_must_exit := 'NO';

    in Prog1 there is a button calling prog2, in prog2 (my version don´t fires When-new-form-instance, too) I wrote a WHEN-NEW-ITEM-INSTANCE, at FORM LEVEL :

    if :global.form_must_exit <> 'NO' then
    message('Exiting ...'); pause;
    exit_form(NO_VALIDATE);
    end if;

    and in prog3 I just setted the GLOBAL to YES, in a push-button. I just run it some minutes ago : all worked as expected.

    OBSERVATION : this is NOT a step-by-step list, I´m just showing a general technique, u will need to do some research.

    []s
    Chiappa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width