[archive] Unexpected events added to the stack - How to clear the stack

[Migrated content. Thread originally posted on 24 October 2008]

Using AcuBecnh 7.2

I DISPLAY an AcuBench screen (screen a). It is a Floating window, MODELESS = TRUE. From there I call another Floating window (screen B). It is MODELESS = FALSE. Screen B lies on top on screen A. On screen B I have 2 entry fields (account number and amount). They both have bef-procedure, the first one (account no) has an Event procedure for Msg-validate and the second one (amount) has an aft-procedure. I also have a bef-procedure and aft-procedure on screen B.

On screen B, I type a value in account number field and press Enter, the following sequence of events occurs:

Acct-no-ef-ev-msg-validate
Screen-B-aft-procedure
Amount-ef-bef-procedure

The cursor is then found on the Amount entry field.

Problem: When I add a message box display in the Acct-no-ef-ev-msg-validate

DISPLAY MESSAGE BOX
"GOOD ACCOUNT"
TYPE IS Mb-OK
ICON IS Mb-Warning-Icon
DEFAULT IS Mb-OK
RETURNING Acu-Return-Value

The sequence of events changes as follow:

Acct-no-ef-ev-msg-validate
Screen-B-aft-procedure
Amount-ef-bef-procedure
Acct-no-ef-event-proc (EVENT-TYPE = 3 so no code is executed in this paragraph)
Amount-aft-procedure
Acct-no-bef-procedure

The cursor is then found on the Account number entry field.

This is a problem since I would like to inform users of potential problems with the data entered before attempting to save the record, but I do nnot want to stop them then.

I tried setting the various values for EVENT-ACTION and ACCEPT-CONTROL after the DISPLAY MESSAGE BOX without success.
Can anyone help?