Puzzle: Access Message Boxes with no VBA code (2 Viewers)

The only thing nobody has yet explained is why the menu bar gets restricted only after you click OK on the second message.
The order of the events is important. In addition, Allow Full Menus is disabled in the database options.
The form’s Load and Current events display two message boxes. At that point, the form is still open, so Access continues to show the full ribbon.
After that, the AutoExec macro closes the form. The form bein closed, there are no full document windows open. Because of this, Access switches to its restricted ribbon mode.
At the same time, the form’s On Close event fires and displays the final message box.
 
@KitaYama
Very good explanation in my opinion.
I think its worth stressing that the sequence of events matters because Access is single-threaded so can only process one action at a time.

One question:
Whilst keeping all three messages as form events (i.e. not run from the macro) and in the same order, can you work out how to make the menu bar restriction occur BEFORE the SECOND message appears? Just one simple change needed.
 

Users who are viewing this thread

  • Back
    Top Bottom