Conditional Format for Background Color

C

Chip

Hi All!

I have a form with a check box on it. Is it possible to
have the background for the form change color depending if
the check box is checked or not?

For example, the background color would remain green if
the checkbox is unchecked but will turn white once the
check box is checked.

Is this possible?
And how? :)

A thousand thanks in advance!
--Chip
 
D

Damon Heron

Put the following code in the click event - change backcolor numbers to your
own...

Private Sub Check4_Click()
If Me.Detail.BackColor = 32768 Then
Me.Detail.BackColor = 255
Else: Me.Detail.BackColor = 32768
End If
End Sub

HTH
Damon
 
C

chip

Thanks!

-----Original Message-----
Put the following code in the click event - change backcolor numbers to your
own...

Private Sub Check4_Click()
If Me.Detail.BackColor = 32768 Then
Me.Detail.BackColor = 255
Else: Me.Detail.BackColor = 32768
End If
End Sub

HTH
Damon




.
 
Top