Code to change label colour

T

Tony Williams

I want a label control of a tickbox on a form to change colour if it is
checked, assuming the checked value is YES. I've tried this code but it
doesn't work

Private Sub txtwithdrawn_AfterUpdate()
If Me.txtwithdrawn Is Yes Then
Me.txtwithdrawn_Label.ForeColor = 255
End If
End Sub

Can anyone help me here.
Thanks
Tony
 
T

Tony Williams

Sorry for posting too swiftly, realised that checked value should be = True
and it worked.
Thanks
Tony
 

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