Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

how to close a form in Oracle 8i form application?

I am designing an oracle 8i application using oracle form builder

I design a form "Find Download". When I close this form by clicking the right top close (X), it comes up the empty detail download form. Then I close the detail form to also close the "Find Download" form

But what I want is close the Find Download" Form, that is all, no need to open detail download form.

That is because I put the following in the Find Download form

Next Navigation Block         XX_DOWNLOADS_V
Previous Navigation Block  XX_DOWNLOADS_V


But If I change Previous Navigation Block to null, when I close the form, it open "Export" form.
if  I change Previous Navigation Block to Find_Download block, I cannot close the Find_download form

In my Find Download form, I have a button "Find" with the following code

:parameter.G_query_find := 'TRUE';
app_find.find('XX_DOWNLOADS_V');
:parameter.G_query_find := 'FALSE';


How to fix this problem?

Avatar of Dr_Billy
Dr_Billy
Flag of Canada image

Can you give more details about how your navigation works ? its a bit ambiguous the way you described it
Avatar of wasabi3689

ASKER

I attached 3 photos for you

1. Find_download open
2 click on Close (X) on the coner of the form
3. open download form

I want to close find_download form, just close, no need to pop up download form
find-download.JPG
download.JPG
struture.JPG
any ideas?
When you close the current window for Find_Downloads then the forms are searching a navigable block that can set the focus to , that's why you need to specify one programmatic so you can set the focus your self instead of letting forms deciding on that.
 
One more thing that I need to know , how do you call that window ? I mean is it the main screen when the form starts up ? if not what is the main screen that appears before you call this window , since you need to get to that window again after that screen loses the focus .

Try that now and hope that will solve your problem

Create a trigger on the form level

WHEN-WINDOW-CLOSED

and place the following code in it
IF :System.Event_Window = 'Window that holds your Find_Downloads' THEN 
  Set_Window_Property('Window that holds your Find_Downloads', VISIBLE, PROPERTY_OFF); 
else
  Go_Block('Name of any other block you want the focus to be set at');
END IF;

Open in new window

and by the way , are these separate forms or both screens are in the same form but in different blocks ?
It still pop up another form when I close it.

it's in the same form but in different blocks

I have

WHEN-WINDOW-CLOSED

execute_trigger('CLOSE_WINDOW');

CLOSE_WINDOW

APP_CUSTOM.CLOSE_WINDOW(:SYSTEM.EVENT_WINDOW);


--execute_trigger('CLOSE_WINDOW');
 
IF :System.Event_Window = 'Find_Downloads' THEN 
  Set_Window_Property('Find_Downloads', VISIBLE, PROPERTY_OFF); 
else
  Go_Block('XX_Downloads_V');
END IF;

Open in new window

are you sure that your trigger is firing ? put a message in the trigger to ensure you are firing the trigger when closing the window . and let me know what happens !
The user never got back to us on the status of fixes we suggested ..... !
The user never got back to us on the status of fixes we suggested ..... !
ASKER CERTIFIED SOLUTION
Avatar of wasabi3689
wasabi3689
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Am glade that you have found a solution , but as the moderator mentioned above always respond to your tickets .

Best of luck.