Change Label Color on Focus or Enter

vandido626

Registered User.
Local time
Today, 08:08
Joined
Sep 16, 2005
Messages
31
I'm trying to change the backcolor of a label when I select its data entry field but cant seem to get it right.

I place the code below on the On Enter and also tried it on the On Got Focus property of the text box an nothing.....can someone help me out?

Code:
Private Sub GreenBack()
Dim Green As Long
Green = RGB(0, 128, 0)
Me.Label5.BackColor = Green
End Sub
 
Yes you can use a 20 line code posted on microsoft OR :
Code:
Private Sub GreenBack()
Dim Green As Long
Green = RGB(0, 128, 0)
Me.Label5.BackStyle = 1   ' Changeing Backstyle to Normal so you can edit BackColor ;)
Me.Label5.BackColor = Green
End Sub
 
Yes you can use a 20 line code posted on microsoft OR :
Code:
Private Sub GreenBack()
Dim Green As Long
Green = RGB(0, 128, 0)
Me.Label5.BackStyle = 1   ' Changeing Backstyle to Normal so you can edit BackColor ;)
Me.Label5.BackColor = Green
End Sub


OH .backstyle=1

thanks!
 

Users who are viewing this thread

Back
Top Bottom