The Environment:
Forms 6i on Windows XP
Oracle 8.1.7
The Issue:
Users open forms using a drop down menus. If a user selects a form from the menu, I want to check to see if that form is already running. If the form is already open, I want that active form to be displayed. If not then open the form.
For the menu item, I used the following code.
PROCEDURE call_the_form
(i_form_name IN VARCHAR2)
IS
l_form_id FORMMODULE;
BEGIN
l_form_id := FIND_FORM(i_form_name);
IF ID_NULL(l_form_id) THEN
OPEN_FORM(i_form_name, ACTIVATE, SESSION);
ELSE
GO_FORM(i_form_name);
END IF;
END;
When this procedure is called in menu, it just opens another session of the desired form. When called in form, the code displays the openned form.
I also tried this:
BEGIN
GO_FORM(i_form_name);
IF FORM_FAILURE THEN
OPEN_FORM(i_form_name);
END IF;
END;
But got the same results.
Thanks for any help.
Forms 6i on Windows XP
Oracle 8.1.7
The Issue:
Users open forms using a drop down menus. If a user selects a form from the menu, I want to check to see if that form is already running. If the form is already open, I want that active form to be displayed. If not then open the form.
For the menu item, I used the following code.
PROCEDURE call_the_form
(i_form_name IN VARCHAR2)
IS
l_form_id FORMMODULE;
BEGIN
l_form_id := FIND_FORM(i_form_name);
IF ID_NULL(l_form_id) THEN
OPEN_FORM(i_form_name, ACTIVATE, SESSION);
ELSE
GO_FORM(i_form_name);
END IF;
END;
When this procedure is called in menu, it just opens another session of the desired form. When called in form, the code displays the openned form.
I also tried this:
BEGIN
GO_FORM(i_form_name);
IF FORM_FAILURE THEN
OPEN_FORM(i_form_name);
END IF;
END;
But got the same results.
Thanks for any help.