This project provides a custom and enhanced message box replacement for the default MsgBox found in Access.
A free ACCDB database with a Your-Code-Wizard containing all the code for Access 2007/2010/2013/2016/365(2019) for 32bit and 64bit is available below!
This is not a tool I created myself, but I put quite some work into improving it. I tried to contact the original developer Renaud Bompuis and made the update available to him, but I also wanted to make sure it's available from here.
Renaud explains very good how easy it is to replace the original msgbox with his dialog.box or dialog.richbox - the latter displaying Access richt text format.
The improvements I made over his original 1.10 version are documented at the bottom of this page in detail.
You can download the database in accdb format here. If you change anything, especially improve the code, please send me an update. Also make sure to leave credits and links to Renauds and my page in the code.
(of version 1.25 for the 29th Access Europe Usergroup meeting on July 3rd 2024)
You need to grab all files from the file you download and copy them into your own application (there is another module in the demo database - compared to Renaud's version)!
So let's see what the improved version can do for you. In the first picture you see the base form of the tool. I redesigned it a little to make room for the features which include:
This is what the buttons can look like now. First image shows button 1 to be the (system)default, the second image shows the middle button (button 2) to be the (custom) default. In both images you can see the number in brackets (3) and (2) - which are the AutoCloseSeconds remaining before the specific button will be "pressed".
In the upper part of the next image you see the Your Button Code page open, showing the code that can be copied and pasted into your application! A little side note: The code might look ugly in this preview, but looks very nice in your code window! You can see the wizard created code below this image.
Your-Code-Wizard from one of the dialog boxes above - ready to copy&paste! No need to code anything by hand.
You can use the ampersand (&) symbol before characters in the button description to enable keyboard access as usual:
Sometimes things just won't work as you expect. There are several workarounds which might help you.
If you get a "too many line continuation error" (happens sometimes even if you have checked the "Avoid Long Wizard-Text-Code"), I suggest a simple solution. Place all the generated text that should be displayed into a variable and simply display the variable instead of direct text in the dialog.box. Many times I use this as it's likely to have changing data anyways and thus preparing a string seems a better way to me. Please see the auto generated code above for an example (which was created by an unpublished version of the tool).
Please note, that this first idea may actually not work. I suggest you try the second idea first to get the improved enhanced message box working for non-unicode languages.
To solve: Instead of writing the Urdu (non-unicode) message in VBE, store it in a table and then call related text message when required.
I was notified, that an older version (1.18) did throw an error when the user started the tool. This error looked like this:
It turned out, that actually the VBA editor is not capable of using unicode (in simple words) but the user mentioned, that he is working on a system with regional settings set to Arabic (Saudi-Arabia). We tried and found a/the solution how you can make the software work on your system.
To reproduce, please visit and copy some Urdu (non-unicode) text from e.g. www.urdupoint.com (a website in Urdu language), use it in frmEnhancedMessageTest to generate the code (and view the message box demo) and then use the same code into any button click event on the same form. You will see that demo works fine but click event code message box strange.
To solve, please open the regional settings on your windows using Windows-Key + R to open the execute window. Type intl.cpl and press the Enter-Key. You will see a window where, on the right register (Administrative) you can change some regional settings. Click there the button in the lower part of the window that reads Change system locale. In the following window, check the checkbox that is labeled like Beta: Use Unicode UTF-8 for worldwide language support. Doing this should enable you to use the application (after your system has been restarted).
Similar tools are the Attention Seeking Database and the Formatted Message Box, both from Colin Riddington.
Please let me know using the contact form.