Jason Lee Hayes
Active member
- Local time
- Today, 22:42
- Joined
- Jul 25, 2020
- Messages
- 221
Hi,
I wish to make the label BOLD when hovering above it with the mouse then when the mouse is moved away from the label the bold is reduced back to its default NORMAL size..
Its a nicety not a necessity for my project...
Been searching and came across this code:-
Make label bold when cursor hovers - Microsoft: Access Forms - Tek-Tips
Unfortunately when a create a module it fails to compile and i get an INVALID USE OF ME KEYWORD ERROR
Any help would be appreciated; maybe something to do with not dimensioning ME..
Thanks in advance
I wish to make the label BOLD when hovering above it with the mouse then when the mouse is moved away from the label the bold is reduced back to its default NORMAL size..
Its a nicety not a necessity for my project...
Been searching and came across this code:-
Make label bold when cursor hovers - Microsoft: Access Forms - Tek-Tips
Unfortunately when a create a module it fails to compile and i get an INVALID USE OF ME KEYWORD ERROR
Code:
Option Compare Database
Dim strCtl As String
Dim blnSet As Boolean
Function fSetBold(sI As String)
' this sets Bold on for the control name passed
' it also turns Bold off of the last control
' that was set using this function if it wasn't
' already reset using function fResetBold()
If blnSet = False Then 'prevents flickering
If strCtl <> "" And strCtl <> Null Then
Me(strCtl).FontBold = False
End If
Me(sI).FontBold = True
strCtl = sI ' store the name of this control to a variable
blnSet = True ' store a value to the variable
End If
End Function
Function fResetBold()
' This turns off Bold when the cursor
' leaves the control and does not need a
' value for the control's name passed because
' it uses the value in the variable strCtl
If blnSet = True Then
If strCtl <> "" Then
Me(strCtl).FontBold = False
End If
blnSet = False
End If
End Function
Any help would be appreciated; maybe something to do with not dimensioning ME..
Thanks in advance