Close a window in query mode [message #450878] |
Sat, 10 April 2010 03:01 |
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 #450936 is a reply to message #450878] |
Sun, 11 April 2010 03:25 |
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.
|
|
|
|
|