INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Conditional Formatting not working

Conditional Formatting not working

(OP)
I have a form with a combo box to select items. Also on the form is a checkbox (tri-state) named Done. I want the color of the combo box text to turn colors based on the state of the tri-state check box. I actually have about 7 forms with this setup...they all work and change colors as they should based on their respective check boxes. Except for this one

Form the Combo box name: = ComboCACTUS Checkbox name: = Done
Conditional formatting attached to ComboCACTUS: Expression IIf([Done]=Yes,1,0) (sets text of combo to green), Expression IIf([Done]=No,1,0) (sets text of combo to Red), Expression IIf(IsNull([Done]),1,0) (sets text of combo to blue).

The base color of the text shows as black and will not change to any of the above colors no matter what the state of the check box is.

This is done in MS Access 2007/2010. I have also recreated...the issue remains.

I have changed names and that does not help.

Any suggestions?

RE: Conditional Formatting not working

I'm not sure why your expressions are so complex. Why not use:

CODE --> expressions

[Done]=true
[Done]=False
IsNull([Done]) 

Duane
Hook'D on Access
MS Access MVP

RE: Conditional Formatting not working

(OP)
dhookom, I took your advice.
Expression [Done]=True
Expression [Done]=False
Expression IsNull([Done])

This still does not work.

[Done] is a tri state check box control. The table field Done is set to Number. This is the same for all tables that hold a field "Done". And all of the forms with their respective Combo boxes and Done fields work....except this one.

I even tried your suggestion with the expressions for [Done]= -1, and [Done] = 0, null remained the same....still did not work.

Can I provide you with any other information?

RE: Conditional Formatting not working

(OP)
Duane, I tried attaching the conditional formatting to a text box control on the same form....it works. But, it won't work on the comboBox. S-T-R-A-N-G-E.

RE: Conditional Formatting not working

The conditional formatting worked for me on a combo box. I didn't attempt with a tri-state check box.

Duane
Hook'D on Access
MS Access MVP

RE: Conditional Formatting not working

(OP)
Yes..I agree it works...on all others...and they are depending on the value of their "Done" tri state boxes. I have even completely created a new Form with new controls...same issue. Could there be something wrong with my naming convention? Or, could there be something restricting the font color change?

RE: Conditional Formatting not working

Are the fonts the same? Are they all triple-state?

I changed my [Done] field to numeric and the check box to triple state and it all works as expected.

I'm at a loss as to what might be different in your form.

Duane
Hook'D on Access
MS Access MVP

RE: Conditional Formatting not working

(OP)
OK..thanks for the try.

RE: Conditional Formatting not working

I am curious why it doesn't work but under the theory somethings are easier to fix than to explain, try adding another combobox that does the same thing and see if the conditional formatting works.

If it does, remove the problem one... If you have the time to compare the properties of the two to see what is different I think we'd all be interested assuming that is the cause.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close