Need to trap on navigating out of a current form into another form
I have an application that consists of many forms. We want to prevent a user from leaving a form before any changes are saved. We have added code to prevent them from opening another form, but if they open form A (no changes), then open form B (without closing A – A calls B). On form B make a change, use the title bar to move the form out of the way, then click on form A. Oracle itself traps that form B has unsaved changes, but form A is still the current (highlighted – in focus) form. We want to prevent form A from becoming the current focus form till form B has had all changes cleared or saved. Does anyone know of a simple way or appropriate trigger to add the code to that would let us display our message? I tried when-window-deactivated, but since the user is changing forms, it does not fire. I also tried the post-block, but it also appears to not fire when changing forms.