|  | Colour Coding Combo Box |  | |
| | | Katherine Smith |  |
| Posted: Fri Sep 05, 2008 9:55 am Post subject: Colour Coding Combo Box |  |
I have a database of projects that I want to add priorities to. I have included a combo box with options of high, medium and low. Is there any way that I can change the colour of the writing or the colour of the background so I have a sort of traffic lights system in order to grab people's attention more easily. I would like to have one colour for each level of priority but can only seem to change the background or font coulour for all of the words together. |
| |
| | | Stockwell43 |  |
| Posted: Fri Sep 05, 2008 11:02 am Post subject: RE: Colour Coding Combo Box |  |
Hi Katherine,
There are probably several ways to do this better but you can try the following in the OnClick or AfterUpdate event of the CBO and also do not leave the " " around you CBO name:
If Me."yourCBOname" = "High" Then Me."yourCBOname".Backcolor= "255"
ElseIf Me."yourCBOname" = "Med"" Then Me."yourCBOname".BackColor = "32768"
ElseIf Me."yourCBOname" = "Low"" Then Me."yourCBOname".BackColor = "65535"
Else End If
"Katherine Smith" wrote:
| Quote: | I have a database of projects that I want to add priorities to. I have included a combo box with options of high, medium and low. Is there any way that I can change the colour of the writing or the colour of the background so I have a sort of traffic lights system in order to grab people's attention more easily. I would like to have one colour for each level of priority but can only seem to change the background or font coulour for all of the words together. |
|
| |
| | | Tom |  |
| Posted: Fri Sep 05, 2008 6:20 pm Post subject: Re: Colour Coding Combo Box |  |
Is it a continuous form or does it only display a single record?
If its a continuous form you will need to use conditional formatting. If displaying a single record you can use something like Stockwell43 suggested, just don't forget to update the colors as you move from record to record (use the On Current event).
Tom
***This is for A2003 and prior - A2007 may be different - I have a vague recollection that A2007 made some changes in conditional formatting. |
| |
|
|