agrogers15
New Member
- Joined
- Sep 9, 2016
- Messages
- 10
I am using the status of a checkbox to change the color of a rectangular box behind a field for quick status reference.
First thing I notice that I don't understand, is the color changes opposite of how I think. I originally had the colors in the opposite spot so that when I check the box it turns green but it was opposite. I then changed the initial If statement to No but it still did the same thing. So I changed the color syntax locations and it worked, but it doesn't stay in the proper back color. When I close the form and reopen it defaults back to red. How do I keep the backcolor while the checkbox is checked?
Code:
Private Sub Permit_Received_Click()
If Me.Permit_Received = Yes Then
Me.PermitHighlight.BackColor = vbRed
Else
Me.PermitHighlight.BackColor = vbGreen
End If
End Sub