Puzzle: Access Message Boxes with no VBA code

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.
 
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.
I failed. I couldn't find a way to do it. Let's wait for a while to see if anyone else can find a way.

By the way, I found a way to make the ribbon in restriction mode even before the first message box.


1- Open any database.
2- Open your AccessMsgBoxNoCode.accdb
 
I failed. I couldn't find a way to do it. Let's wait for a while to see if anyone else can find a way.

By the way, I found a way to make the ribbon in restriction mode even before the first message box.

1- Open any database.
2- Open your AccessMsgBoxNoCode.accdb

OK - I'll see if anyone else wants to take up that challenge. Its very simple!
Good point re: spoiler
 

Users who are viewing this thread

Back
Top Bottom