Advanced Message Box

“Advanced” Message Box

Message boxes can be modified quite extensively to give you your user a much better experience. So before you set about creating a Form to use as a Messsage Box, consider using the more advanced features of a “Built In” Message Box.

There’s a really nicely done example database on message boxes from Colin on  Access World Forums here:- An Attention Seeking Database

Extract:-

Features include various ways of creating messages to get users’ attention including:
1. Formatted message boxes
2. Customised message boxes with HTML formatting & countdown timer
3. Flashing, scrolling and balloon tooltip text 
4. Dim / blur / remove background
5. Adding warning sounds (use speakers if possible)

“Advanced” Message Box - Walk Through

“Advanced” Message Box - Walk Through

Video 1  (8:06)

Message boxes have some advanced features which you may or may not be aware of. In this video I demonstrate some of these advanced features. In the video I mention an old programming technique. I believe I happened across the term for it today, and the term is “Bit-wise Comparison” You can see my non-explanation of it here at time index:- https://youtu.be/f1tDWoKOkek?t=4m31s

Video 1  (8:06)

Nifty Access YouTube Thumb Nail
Play Video

More Info on “Advanced” Message Box:-

… …

“Advanced” Message Box 2

“Advanced” Message Box 2

Video 2 (3:43)

In this follow-up video from my first Advanced Message Box Video, I demonstrate the code working in The “Nifty Switchboard Builder”. I go through what’s happening demonstrating the code actually controlling events, and explain how it’s doing it. I have also provided a code example of the Message Box Code working in a sample database. Download the code by clicking on the link below.

Video 2 (3:43)

Nifty Access YouTube Thumb Nail
Play Video

… …

“Advanced” Message Box 3

“Advanced” Message Box 3

Video 3 (8:06)

I wanted to delete a Menu Page in my “Nifty Switchboard Builder”. The Switchboard Builder helps you build a menu system for your MS Access database. It’s based on the original Microsoft switchboard builder, but I have added some extra features, and made it a lot easier to use! I needed to check that the user was sure that they were ready to delete a menu page and understood the implications. I also didn’t want them to be able to delete the “Main Menu” the “Master Menu Page” because this would cause all sorts of complications. I realise that the “Advanced Message Box Code” would just drop in and allow me to quickly and easily create a pop-up message box and help the user in making the correct decision. I also had two, different user cases to solve, one was calling the code from a button on the form and the other one was calling the code on a pop-up form, both common MS Access User Case scenarios. I recorded the generation of the code and my thoughts about my decisions in creating the code in the YouTube videos ABOVE which should help anyone who wants to undertake the same task in their own database. The code is also available for free in text format at the bottom of this web-page.

Video 3 (8:06)

Nifty Access YouTube Thumb Nail
Play Video

… …

Example of the MsgBox Code

I have recently updated the sample message box code (SEE BELOW) to reflect an actual real world example. It’s not quite the same as the code shown in Video 1 ABOVE. There are now THREE Videos Demoing the Advanced Message Box. I have also packaged the code shown in that video in a Sample Database which you can download by clicking on the download links above. It contains TWO working examples of the “Advanced Message Box Code” in use. The Code is based on the “Nifty Switchboard Builder”. The Switchboard Builder allows you to create a new Switchboard Page, the Switchboard Page will have a default name, however this Message Box offers the user the option to change the default name to something else, or to leave it as the default name and escape from the process without making any changes.

“Advanced” Message Box -Code Example

				
					Private Sub btnGo_Click()
If txtNewPageName = "" Or IsNull(Me.txtNewPageName) Then
    Me.txtNewPageName = "Default New Page Name"
End If

    If txtNewPageName = "Default New Page Name" Then

            Dim strMsg1 As String
            Dim strYes As String
            Dim strNo As String
            Dim strCancel As String
            Dim strTitle As String

            strMsg1 = "Do You Want Change Default Page Name, to Something Meaningful?"
            strYes = "  Yes:          Return to the Textbox. I will Create my own Name"
            strNo = "  No:          Just Use the Default Please"
            strCancel = "  Cancel:    It's Bloody Confusing, I'll Just Play it Safe for Now"
            strTitle = conAppName & " --- Change Default Page Name?"

                Select Case MsgBox(strMsg1 & vbCrLf & vbLf & strYes & vbCrLf & strNo & vbCrLf & strCancel & vbCrLf, vbYesNoCancel + vbQuestion, strTitle)
                    Case vbYes:
                        Me.txtNewPageName = ""
                        Me.txtNewPageName.SetFocus
                    Case vbNo:
                        Call fAddNewPage
                        DoCmd.Close acForm, Me.Name
                    Case vbCancel:
                        DoCmd.Close acForm, Me.Name
                    Case Else: 'Default case to trap any errors
                        'Do nothing
                        MsgBox "Error From --- Select Case in btnGo_Click"
                End Select
    Else
        Call fAddNewPage
        DoCmd.Close acForm, Me.Name

    End If
End Sub      'btnGo_Click
				
			

More Useful Stuff HERE:-

Leave a comment

This website uses third-party software - WordPress Add-Ins to be exact. I don't know what any individual add-in does, but I'm sure that many of them collect information about you. So be aware, if you continue using this site, then you are likely to be sharing your information. I don't know how to disable this sharing for any, or all of the plugins for individual users. So I can't stop the sharing of information. If this worries you then please do not use this site... If you continue to use this site I will assume that you are happy with it.

Do you need a hand in the right direction?

You are in the right place.