Hi
This would change the lable [LableA1] if you checked the checkbox
[MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
You will need to change the colors to what you want.
Private Sub MycheckboxName_AfterUpdate()
On Error GoTo MycheckboxName_AfterUpdate_Err
If Me.MycheckboxName = 1 = True Then
Me.LabelA1.BackColor = vbYellow
Me.LabelA1.ForeColor = vbRed
Me.LableA1.FontBold = True
Else
Me.LabelA1.BackColor = vbBlack
Me.LabelA1.ForeColor = vbGreen
Me.LableA1.FontBold = False
End If
End Sub
--
Wayne
Manchester, England.
"Appache" wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> I have two checkboxes in an continuous form and I want to change the color of
> labels which are associated with these checkboxes. I read sth on internet and
> figured out I cant use conditional formatting with checkbox so I try to find
> out another solution and came up with this. I deleted labels and add two
> texboxes and tried to use conditional formatting on that texboxes. I chosed
> Expression Is and wrote [MycheckboxName]=True as my condition in order to
> change the color of textbox if checkbox is checked. Everything is ok but when
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> the backcolor of the texbox changes, it also changes the text with 0 or -1
> which is weird for me. Is there any way to do it without changing text ? The
> text in the textbox is static.
>
> --
> Thanks