fMouseOverCurrent()...

Sometimes you have a Form that has a few Command Buttons but you don't want to have an actual button showing.  While you could just use the Background Hover Color, here's another way to show Users where the mouse is.

This Function will allow a bullet to show to the left of the control the mouse is hovering over.
The difficult I do immediately, the impossible takes a little bit longer.
Function fMouseOverCurrent(str As String)
On Error Resume Next
 
    If str = "None" Then
        Me.imgBullet.Visible = False
    Else
        Me.imgBullet.Visible = True
        Me.imgBullet.Top = Me(str).Top
        Me.imgBullet.Left = Me(str).Left - 220 'Twips
    End If
 
End Function
VBA
Tips (Main)
Home
Creating a Multi-Value field using Alphabet
Copy Fields Down from above Record
Loop thru records and OutPutTo seperate .RTF or .PDF
Modified Spell Check
Code Snippets
Lock\Unlock Bound Controls
Loop while renumbering two columns
Create a Table with Dynamic Field Names
Snippets for Exporting to Excel
Log Field Changes
Log Record Deletions
Check for Duplicate Values
ValidateData()
ClearClipboard()
Selecting an Excel Worksheet from Access
Send eMail to Multiple Recipients
Cancel Save in a Bound Form
Automatically Send eMail Notifications
fFindBookmark()
Looping Records to Send eMail
fxlFindReplace()
fHighlightRequiredControls()
Check if Table Exists
fAmortization()
Insert (or Remove) Blank Line
To use copy and paste the below code into your modUtilities or a new Module (Remember don't name the Module the same as the Function name.)  Then in the On Mouse Move line in the Properties Window for each Control you want to apply the bullet to place...
Control On Mouse Move (in Properties Windows) Place
imgBullet =fMouseOverCurrent("None")
cmdInvoice =fMouseOverCurrent("cmdInvoice")
cmdPayments =fMouseOverCurrent("cmdPayments")
This site uses cookies to collect data on usage. By continuing to browse this site you consent to this policy. Find out more here.