Home » Developer & Programmer » Forms » Close a window in query mode (Oracle Forms 6i)
Close a window in query mode [message #450878] Sat, 10 April 2010 03:01 Go to next message
Akshita
Messages: 22
Registered: February 2010
Junior Member
How do I close a window in query mode? Can anyone please help me?

My form has a button "Populate from Charge Master" which opens a window containing a List Item (Department Names) and 2 buttons,
1. "Select the Dept" and
2. "Cancel"

The WHEN-BUTTON-PRESSED trigger code for "Populate from Charge Master" button is as follows:

begin
	SHOW_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
	go_block('bl_med_dep');
	enter_query;
end;


Code for "Select" button in the window is:

populate_from_charge_master(:bl_med_dep.med_dep_code,:bl_med_charge_party.charge_party_no);
execute_query;
COMMIT;
HIDE_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
GO_BLOCK('BL_MED_CHARGE_PARTY');
EXECUTE_QUERY;


Code for "Cancel" button in the window is:

BEGIN
	hide_window('WINDOW_POP_FROM_CHARGE_MASTER');
	show_window('WINDOW1');
	GO_BLOCK('BL_CHARGE_COMPANY');
END;


Here WINDOW1 is the main window and WINDOW_POP_FROM_CHARGE_MASTER is the window which must be closed when "Cancel" button is pressed.

When I remove "enter_query" statement in "populate from charge master" trigger code, I am not able to select any of the departments from the list. and If I have that statement, I am not able to hide/close the window.
Can anyone help me with this?

Thanks in advance.

Akshita.
Re: Close a window in query mode [message #450929 is a reply to message #450878] Sat, 10 April 2010 16:42 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
To cancel enter-query mode use exit_form.
Re: Close a window in query mode [message #450933 is a reply to message #450929] Sun, 11 April 2010 01:42 Go to previous messageGo to next message
Akshita
Messages: 22
Registered: February 2010
Junior Member
I dont want the whole form to be closed. I just want the window to be closed.

I used
do_key('abort_query')
and it worked.

Regards & Thanks,
Akshita
Re: Close a window in query mode [message #450936 is a reply to message #450878] Sun, 11 April 2010 03:25 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I did mean exactly what I said. Form builder help says this:
If the operator is in Enter Query mode, EXIT_FORM navigates out of Enter Query mode, not out of the form.

I'm surprised abort_query works since it does something else. exit_form is what you are supposed to use.
Re: Close a window in query mode [message #450939 is a reply to message #450936] Sun, 11 April 2010 04:14 Go to previous messageGo to next message
Akshita
Messages: 22
Registered: February 2010
Junior Member
is it? can u please explain me wat abort_query does...?
Re: Close a window in query mode [message #450944 is a reply to message #450878] Sun, 11 April 2010 07:02 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Look it up in form builder help. All the built ins are fully documented.
Previous Topic: forms to excel data transfer
Next Topic: change colour of the canvas to the default
Goto Forum:
  


Current Time: Fri Sep 20 05:40:56 CDT 2024