Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Calling Forms via Menu

Status
Not open for further replies.

celispb

Programmer
Apr 3, 2003
18
US
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.






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top