If Statement Help

Mannyf50

New member
Local time
Yesterday, 23:15
Joined
Jul 30, 2009
Messages
6
Hey guys this might be a dumb question, i have a form with various checkboxes (12) out of those various check boxes i have 2 that if checked i need to change the backcolor of a textbox to purple, but the other 10 checkboxes need to keep the backcolor to yellow different, how can i set it up so if i pick two of them and the purple one is picked and so is a yellow one, the purple changing checkboxes have priority over the yellow.
 
Try this...

On the afterupdate event of the check box try this
Code:
 Private Sub Check16_AfterUpdate()
 If Me.Check16 = True Then
    'Purple
    Me.txtSubject.BackColor = 9116245
 End If
 If Me.Check16 = False Then
    ' Yellow
    Me.txtSubject.BackColor = 65535
 End If
 
End Sub


Here's a good link to all the color codes:
http://cloford.com/resources/colours/500col.htm


Larry
 

Users who are viewing this thread

Back
Top Bottom