Conitional formatting on a checkbox

dgwils

New member
Local time
Today, 14:29
Joined
Feb 2, 2010
Messages
3
I am trying to set a conditional format within a form so that if a [banned] checkbox is ticked another control will show as a red background. I have tried expression is but no change occurred. Any help would be greatly appreciated, thanks in advance.:(
 
Have you tried writing a VB code in the after update event of the "checkbox"

Something like:

if me.[banned]checkbox = true
then me.othertextname.backgroundcolor = red
End if

you'll probably have to play around with the syntax but I think that would do it for you.
 
Also add an Else statement to set it back to the default colour.
 
Thank you very much I will try that and will post.
 
This type of code will only work in a Single View Form, not in a Datasheet or Continuous View Form. In those type of forms you'll have to use Conditional Formatting. After selecting the texbox to be formatted you'd go to Format - Conditional Formatting and use

Expression Is

[BannedCheckboxName] = True

then select the backcolor Icon and selct red from the palette.
 
Thank you very much, it worked a treat although I had to rename the checkbox to make it work.
 

Users who are viewing this thread

Back
Top Bottom