Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Access

Colour Coding Combo Box

 
Jump to:  
 
Katherine Smith
PostPosted: 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
PostPosted: 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
PostPosted: 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.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Fotka ubranka dla dzieci mieszkania szczecin wynajem warszawa Filmy