Conditional Formatting on Continuous Subform (VBA)

T

Tim

I have a subform with 7 check boxes, and if none of them are checked, I'd
like the background color to change. The code I have now is:

Private Sub Form_Load()
If (Check1 + Check2 + Check3 + Check4 + Check5 + Check6 + Check7 = 0) Then
Detail.BackColor = 8454143
Else
Detail.BackColor = -2147483633
End If
End Sub

The problem is, this is applying to all instances of the continuous subform
together, not evaluating each instance on its own. How can I get it to do
that?

Thanks,
Tim
 

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