W
Walter
I am new to VBA and I am trying to write this simple code to made the JP8
product another color, but I keep getting an error. When I go to the form
it returns me to the VBA and highlight the Private Sub Form_Current(). I
copied most of the code from a book and changed their label to Product.
Thank you in advance for your help.
Walter
Private Sub Form_Current()
If [Product] = JP8 Then
'Make control background opaque.
[Product].BackStyle = 1
'Make control background color white.
[Product].BackColor = vbWhite
'Make font color red.
[Product].ForeColor = vbRed
Else
'Make control background transparent.
[Product].BackStyle = 0
'Make font color black.
[Product].ForeColor = vbBlack
End If
End Sub
product another color, but I keep getting an error. When I go to the form
it returns me to the VBA and highlight the Private Sub Form_Current(). I
copied most of the code from a book and changed their label to Product.
Thank you in advance for your help.
Walter
Private Sub Form_Current()
If [Product] = JP8 Then
'Make control background opaque.
[Product].BackStyle = 1
'Make control background color white.
[Product].BackColor = vbWhite
'Make font color red.
[Product].ForeColor = vbRed
Else
'Make control background transparent.
[Product].BackStyle = 0
'Make font color black.
[Product].ForeColor = vbBlack
End If
End Sub