close form A when open form B

5.6k views Asked by At

I use

open_from('b'); 

in WHEN-BUTTON-PRESSED trigger for open form B from form A.
how to close form A when I open form B by using WHEN-BUTTON-PRESSED in oracle form builder?

2

There are 2 answers

0
Vinish Kapoor On

try this:

close_form('a');
open_form('b');

or

call_form('b');

By using call_form it will hide the form A and then display B and when user will exit from B then A will be active.

0
Abdullah Bahattab On

use new_form Built-in instead of open_form.

new_form will Exits the current form and enters the indicated form.

    PROCEDURE NEW_FORM (
        formmodule_name VARCHAR2,
        rollback_mode NUMBER,
        query_mode NUMBER,
        data_mode NUMBER,
        paramlist_name VARCHAR2);

Where:

formmodule_name

  • Then name of the called form (must be enclosed in single quotes). Datatype is VARCHAR2.

rollback_mode

  • TO_SAVEPOINT (The default.): Oracle Forms will roll back all uncommitted changes (including posted changes) to the current form’s savepoint.
  • NO_ROLLBACK: Oracle Forms will exit the current form without rolling back to a savepoint.
  • FULL_ROLLBACK: Oracle Forms rolls back all uncommitted changes (including posted changes) that were made during the current Runform session.

query_mode

  • NO_QUERY_ONLY (The default.) Runs the indicated form normally, allowing the end user to perform inserts, updates, and deletes in the form.
  • QUERY_ONLY Runs the indicated form in query-only mode; end users can query records, but cannot perform inserts, updates or deletes.

data_mode

  • NO_SHARE_LIBRARY_DATA (The default.): At runtime, Oracle Forms will not share data between forms that have identical libraries attached (at design time).
  • SHARE_LIBRARY_DATA: At runtime, Oracle Forms will share data between forms that have identical libraries attached (at design time).

paramlist_name

  • The name you gave the parameter list object when you defined it. Datatype is VARCHAR2.

simple example:

    NEW_FORM ('FORM_NAME', full_rollback, query_only, no_share_library_data, p_id);