Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting to color certain values in combobox

Status
Not open for further replies.

08211987

Programmer
Apr 20, 2012
187
US
Hi,
I have a combobox where the user wants 5 of 9 items in red to show the importance of their values. I found this post on the internet: but I have not been able to get the values to display in red. I can make the default value red but I cannot get the conditions to be red, plus it seems it will only allow 3 conditions. I'm entering the conditions in quotes " also, seems to be required. Am I doing something wrong?
Thanks!
 
Just to be sure, are you asking for items/values of different colors in the drop down?

[pre]+-------------+
|____________V|
| Level 1 |
| Level 2 |
| Level 3 |
| Level 4 |
| Level 5 |
| Level 6 |
[/pre]

Or are you wanting to color the actual value after it is selected?

Duane
Hook'D on Access
MS Access MVP
 
If you want the choices to be different colors, you cannot do that with conditional formatting. That only colors the selection. The closest would be to use an Listview under "active x" controls. This will allow you to color each selection. But it is a listbox and not a combobox. You can "fake" the combobox by expanding and contracting it.
 
1040v9g.jpg

listview
 
I'm sorry, I thought this post was done and haven't checked. Yes Duane, I was wanting what you provided as an example, some text black and some red. The conditional formatting dialog box seemed like it would provide that but I can see MajP that it only colors the selection. I don't think we'll go the extent of adding active X controls if that is what it takes.
Thanks for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top