I have a combo box that I want to change the back color depending on the selection made. I have the code working but my problem is that when I switch records the color from the previous record remains. Is there a way to reset it to the default color? I'm some what new to all the coding options for VB thanks for any help
Example of my code so far
Private Sub cboElecSafeClass_AfterUpdate()
If Me.cboElecSafeClass.Value = "Action Requiered" Then
Me.cboElecSafeClass.BackColor = 65535
Else
If Me.cboElecSafeClass.Value = "Action Complete" Then
Me.cboElecSafeClass.BackColor = 65280
Else
If Me.cboElecSafeClass.Value = "No Action Requiered" Then
Me.cboElecSafeClass.BackColor = -2147483633
End If
End If
End If
End Sub
Example of my code so far
Private Sub cboElecSafeClass_AfterUpdate()
If Me.cboElecSafeClass.Value = "Action Requiered" Then
Me.cboElecSafeClass.BackColor = 65535
Else
If Me.cboElecSafeClass.Value = "Action Complete" Then
Me.cboElecSafeClass.BackColor = 65280
Else
If Me.cboElecSafeClass.Value = "No Action Requiered" Then
Me.cboElecSafeClass.BackColor = -2147483633
End If
End If
End If
End Sub