Home » Developer & Programmer » Forms » Help in Oracle Forms 6i (Oracle forms 6i)
icon3.gif  Help in Oracle Forms 6i [message #508565] Mon, 23 May 2011 03:50 Go to next message
ankur8819
Messages: 17
Registered: May 2011
Location: India
Junior Member
Hi,
I have a situation where one form calls another. I am opening the other form(say B) using the below code.

declare
temp_form formmodule;
begin
temp_form := FIND_FORM ('D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE');

IF NOT ID_NULL (temp_form)
THEN
--message('17');
GO_FORM ('D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE');
ELSE
call_form( 'D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE' ) ;
end if;

end;


On Form B there is an Exit button on click of which it closes the Form B and returns to Form A

begin
close_form('MODULE3_MULTIPLE') ;
end;

In my scenario on Exit from FORM B i need to enable a button on FORM A.
I am not able to capture the trigger that fires when I Press the Exit.
Can anybody help.
please suggest me some solution to this problem.

Thanks in Advance
Ankur
Re: Help in Oracle Forms 6i [message #508572 is a reply to message #508565] Mon, 23 May 2011 04:33 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to enable it at the end of the first piece of code you posted?
Re: Help in Oracle Forms 6i [message #508576 is a reply to message #508572] Mon, 23 May 2011 04:39 Go to previous messageGo to next message
ankur8819
Messages: 17
Registered: May 2011
Location: India
Junior Member
yeah..but it gave me an error saying 'No reference found to the item being referred'
I guess as the button I want to enable is on a block on the FORM A.so FORM B cant access it.

[Updated on: Mon, 23 May 2011 04:47]

Report message to a moderator

Re: Help in Oracle Forms 6i [message #508579 is a reply to message #508576] Mon, 23 May 2011 04:46 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The first code belongs to Form_A, so - how can it NOT reference an item in Form_A? What I meant was:
declare
  temp_form formmodule;
begin
  temp_form := FIND_FORM ('D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE');

  IF NOT ID_NULL (temp_form) THEN
     GO_FORM ('D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE');
  ELSE
     call_form( 'D:\RSSQ2\Testingpurposes\MODULE3_MULTIPLE' ) ;
  end if;

  -- ENABLE THE BUTTON HERE!
  SET_ITEM_PROPERTY(...);
end;
Re: Help in Oracle Forms 6i [message #508580 is a reply to message #508579] Mon, 23 May 2011 04:54 Go to previous messageGo to next message
ankur8819
Messages: 17
Registered: May 2011
Location: India
Junior Member
Thanks for the reply.
In my scenario,the user goes to Form B.Some logic runs on Form B.If that logic runs successfully, only then I need to enable the
button.
In the solution suggested by you,the button will be enabled as soon as I move from FORM A to FORM B.

Is there any other way (any trigger that fires when I land back to Form A) by which I can implement this functionality?
Re: Help in Oracle Forms 6i [message #508582 is a reply to message #508580] Mon, 23 May 2011 05:02 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You never mentioned that it should be enabled ONLY IF certain condition is met.

OK; in that case, you'll have to let the Form_A *know* that something changed in Form_B. If that "change" is reflected within the database, you could query that table and decide what to do. Otherwise, create a global variable. Set its value in Form_B and check it in Form_A.

Both evaluations should be done at the same place I suggested earlier ("-- ENABLE THE BUTTON HERE!").
Re: Help in Oracle Forms 6i [message #508676 is a reply to message #508565] Mon, 23 May 2011 22:53 Go to previous messageGo to next message
ankur8819
Messages: 17
Registered: May 2011
Location: India
Junior Member
Thanks a lot for helpting me out Smile
Re: Help in Oracle Forms 6i [message #509290 is a reply to message #508565] Fri, 27 May 2011 01:17 Go to previous message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
do processing on form b and save in some table. write code to enable button on form a on when-window-activated trigger.
Previous Topic: SOS!! Form Error while trying to open .fmb file
Next Topic: when-validate-record trigger
Goto Forum:
  


Current Time: Sat Sep 07 15:39:30 CDT 2024