The order of the events is important. In addition, Allow Full Menus is disabled in the database options.The only thing nobody has yet explained is why the menu bar gets restricted only after you click OK on the second message.
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.