Enhanced ControlTip for MS Access

I was trying to help in a forum discussion:

Creating A Dynamic Form To Replace Controltiptext?, Access 2013

and finally decided to create a proof of concept of my general idea for an Enhanced ControlTip.

MS Access Enhanced ControlTipOver the years and over the various editions of MS Access I have found ControlTips to be useful, but unreliable.  Under various conditions, they don’t seem to always display, or display promptly and then become frustrating.  So my basic idea was to replace the built-in ControlTip with a dynamic pop-up form which could display my text.

In the attached demo file below I have included three forms, each illustrating a slight twist on the general concept:

  • Display the Custom Control Tip when you move the mouse over each form control (F_Main_MouseMove)
  • Display the Custom Control Tip when each control gets the focus (F_Main_GotFocus)
  • Display the Custom Control Tip when you press a key sequence in each control (F_Main_Shortcut)

Features

By using such an approach we can avoid the native issues experienced with the built-in ControlTip property where it doesn’t display, or there are delays.

But beyond that, this approach offers other advantages, such as:

  • Rich Text so you can format the text being displayed to make it much more appealing and emphasize certain aspects.
  • You can format the underlying form to fit in with your overall database feel.
  • You could add a delay to display the Enhanced ControlTip as you see fit very easily.

At the end of the day, the Enhanced ControlTip is much more customizable and as a developer you can take it wherever you’d like!

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

 

Download

Feel free to download a copy (unlocked accdb) by using the link provided below:

Download “MS Access Enhanced ControlTip” Enhanced_ControlTip_V1.zip – Downloaded 41939 times – 74.89 KB

Taking things Further

The next step would be to allow to possibly implement a WebBrowser Control and use pure HTML instead of RichText because it is more versatile. We could also explore making the pop-up form have a dynamic sizing to adapt to the ControlTip content. We could include a form caption and make it dynamically populated as part of the routine. And much more …

To be continued at a later date.

4 responses on “Enhanced ControlTip for MS Access

  1. Anders Christensen

    This seems to fail on large monitors, if the control is far to the right due to overflow issues. Have you considered ways to address this issue?

    1. Daniel Pineault Post author

      I’m afraid not. I don’t have such a monitor, so no way to do any testing and truthfully, I am no longer doing Access development so it is doubtful I’ll be revisiting this much.

  2. doug

    So I’m working off a Government PC when I came across this article, rather than download (which I’m not supposed to do) it I made my own quick solution. To use the code below, just a control formatted as you like name “Helptip” to your form and add the code to the got focus / lost focus macros respectively.

    Public Function Helpnote(Form As String, control As String, message As String, Switch As String)

    If Switch = “On” Then
    Top1 = Forms(Form).Controls(control).Top + Forms(Form).Controls(control).Height
    Left1 = Forms(Form).Controls(control).Left
    Width1 = Len(message) * 100
    Forms(Form).Controls(“HelpTip”).Top = Top1 + 25
    Forms(Form).Controls(“HelpTip”).Width = Width1
    Forms(Form).Controls(“HelpTip”).Left = Left1
    Forms(Form).Controls(“HelpTip”).Value = message
    Forms(Form).Controls(“HelpTip”).Visible = True
    Else
    Forms(Form).Controls(“HelpTip”).Visible = False
    End If

    End Function