J
jonefer
I have an old routine that I use to highlight the text on buttons when I move over them with a mouse
I place this Sub routine in my GotFocus and MouseMove events of any button I want this effect on
It has worked with 97-200
cmdHighlightButton(NameOfButton
Does anyone know why access 2003 doesn't like this code?:
Public Sub cmdHighlightButton(ButtonName As String
Const cHIGHLIGHTEDBUTTONFONTCOLOR As Long = vbBlu
Const cDEFAULTBUTTONFONTCOLOR As Long = vbBlac
Dim ctl As Contro
If Me.Controls(ButtonName).Properties("FontBold") = True Then Exit Su
Me.Controls(ButtonName).SetFocu
For Each ctl In Me.Control
If ctl.Properties("ControlType").Value = acCommandButton The
If ctl.Properties("Name").Value = ButtonName The
ctl.Properties("FontBold").Value = Tru
ctl.Properties("ForeColor").Value = cHIGHLIGHTEDBUTTONFONTCOLO
Els
ctl.Properties("FontBold").Value = Fals
ctl.Properties("ForeColor").Value = cDEFAULTBUTTONFONTCOLO
End I
End I
Nex
End Sub
I place this Sub routine in my GotFocus and MouseMove events of any button I want this effect on
It has worked with 97-200
cmdHighlightButton(NameOfButton
Does anyone know why access 2003 doesn't like this code?:
Public Sub cmdHighlightButton(ButtonName As String
Const cHIGHLIGHTEDBUTTONFONTCOLOR As Long = vbBlu
Const cDEFAULTBUTTONFONTCOLOR As Long = vbBlac
Dim ctl As Contro
If Me.Controls(ButtonName).Properties("FontBold") = True Then Exit Su
Me.Controls(ButtonName).SetFocu
For Each ctl In Me.Control
If ctl.Properties("ControlType").Value = acCommandButton The
If ctl.Properties("Name").Value = ButtonName The
ctl.Properties("FontBold").Value = Tru
ctl.Properties("ForeColor").Value = cHIGHLIGHTEDBUTTONFONTCOLO
Els
ctl.Properties("FontBold").Value = Fals
ctl.Properties("ForeColor").Value = cDEFAULTBUTTONFONTCOLO
End I
End I
Nex
End Sub