Check Box Question

  • Thread starter Thread starter Bob V
  • Start date Start date
B

Bob V

Can my form have this code something like this!
If cbRemark = -1 then tbRemark colour256

Trouble is that Conditional formatting does not have the colour I want
Thanks for any help..........Bob
 
It can if you put the code in a separate sub and call it from the Current
event of the form as well as the AfterUpdate event of the "cbRemark" control.
You will need to properly address the property you want to change though.
(BackColor or ForeColor)

Private Sub ColorChange()

If Me.cbRemark = True Then
Me.tbRemark.ForeColor = 255
Else
Me.tbRemark.ForeColor = 0
End If

End Sub
 
Thanks RuralGuy, Brilliant................Regards Bob
Private Sub Form_Current()

If Me.ckbRemindTogC = True Then
Me.tbRemindC.BackColor = 12189695
Else
Me.tbRemindC.BackColor = -2147483643
End If

End Sub
 
If you make it a separate sub routine then you can call it from both the
Cerrent event of the form AND the Click event of the ckbRemindTogC control.

Bob said:
Thanks RuralGuy, Brilliant................Regards Bob
Private Sub Form_Current()

If Me.ckbRemindTogC = True Then
Me.tbRemindC.BackColor = 12189695
Else
Me.tbRemindC.BackColor = -2147483643
End If

End Sub
It can if you put the code in a separate sub and call it from the Current
event of the form as well as the AfterUpdate event of the "cbRemark"
[quoted text clipped - 17 lines]
 

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

Back
Top