Forum Stats

  • 3,728,036 Users
  • 2,245,522 Discussions


DO_KEY('EXIT_FORM') does not fire KEY-EXIT trigger for button

SebaVasta Member Posts: 29 Red Ribbon

We have one form which has an exit button to exit the application (i.e. Menu form).

This exit button has WHEN-BUTTON-PRESSED trigger with a DO_KEY('EXIT_FORM'); line. It has only this line of code in the WBP trigger.

There is also a KEY-EXIT trigger that is attached to this button. This fires correctly and shows an alert to the user asking "Do you wan to exist the system or not?".

This works fine.

Now I want to do the same for one particular form. Users want to show an alert "Do you want to exist screen?" alert when user presses exit button.

In this specific screen the the exit button only has the WBP trigger. It also has the DO_KEY('EXIT_FORM'); line. It did not have a KEY-EXIT trigger.

So like the menu form I added a KEY-EXIT trigger.

Problem is, this KEY-EXIT trigger does not fire.

I checked the properties of the menu form button and triggers against the specific screens triggers and all are the same.

Why is this happening? Why is the KEY-EXIT does not fire for the specific screen?

The exit button is in its own button canvas in both the menu form and the specific screen.

PS: We are using Forms [64 Bit] Version


  • Hub Tijhuis
    Hub Tijhuis Member Posts: 81 Bronze Badge

    Are the navigable options (key and mouse) the same for both buttons?

  • SebaVasta
    SebaVasta Member Posts: 29 Red Ribbon
    edited April 27


  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,545 Employee

    After re-reading what you posted, I was left with a few questions.

    1. You said, "There is also a KEY-EXIT trigger that is attached to this button." If you have a WBP trigger with code expected to be used to do EXIT_FORM, why would you also have a KEY-EXIT trigger associated with the button? Typically, in a case like this the KEY-EXIT trigger should be at the form (or block) level, but not the item.
    2. What code do you have in the KEY-EXIT trigger?
    3. Are you certain your changes (the addition of the KEY-EXIT) were saved and a new FMX generated? To prove this simply make an obvious visual change. For example, set the canvas color to purple (for testing purposes). This will validate that your changes are in the form you are running.

    And just a reminder, Forms 11.1.2 is no longer entitled to Support. This means no more updates, bug fixes, security patches, or new certifications. Please consider upgrading to a Supported version. The latest version is You can even try it out in Oracle Cloud and avoid having to download and install (and configure) the software. Details here:

Sign In or Register to comment.