Here's a technique that is the equivalent of selecting the Cancel Query button when the form is in Enter Query mode. The technique used is simple but not conspicuous as we use the KEY-EXIT trigger. Write a KEY-EXIT trigger with the Fire In Enter-Query Mode property set to TRUE (in Forms 4.x) and to Yes in higher versions:
KEY-EXIT EXIT_FORM(NO_VALIDATE);
Note that programmatically simulating Cancel Query in Enter-Query mode is not the same as ABORT_QUERY. Simulating Cancel Query is aborting Enter Query mode.
GUI Development
Advanced GUI Development: Developing Beyond GUI
Multi-form Applications
Advanced Forms Programming
Error-Message Handling
Object-oriented Methods in Forms
Intelligence in Forms
Additional Interesting Techniques
Working with Trees
Oracle 8 and 8i Features in Forms Developer