This content has been marked as final. Show 6 replies
To see what mode you are in, use the :system.mode variable. When in enter-query mode, exit_form will cancel the query and at other times it will close the form. So you can use this code to close the form when in enter-query mode (goes in the key-exit trigger):
if :sysytem.mode = 'ENTER-QUERY' then exit_form; end if; exit_form(<options>);
if you do that, then check, where you do it.
KEY-EXIT for example is not the best place, because you need a way to exit the query, without exiting the form
Key-Exit is the best place, because the question is about exiting the form in enter-query mode.
With the standard menu, the query can be cancelled from Query > Cancel or from the button which features a question mark and an X.
I understand the problem. But solving it this way means, that you cannot cancel the query through the Oracle Forms standard-technique...
The Exit button in the standard menu is disabled when the form is in enter-query mode. My standard technique has always been to use the Cancel Query button to cancel a query and the Exit Form button to exit the form ;-)
after few attempts (the message "query cancelled" was still appearing), i solved putting this code in the key-exit trigger of the master block
msglvl := :system.message_level;
:system.message_level := 20;
if :system.mode = 'ENTER-QUERY' then
:system.message_level := msglvl;
thank you all