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




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top