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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Forecolor on certain fieldvalue

Status
Not open for further replies.

bommelbaars

Programmer
Nov 11, 2001
4
NL
I want to change the forecolor (and fonttype e.g. bold in stead of normal) in a field, depending on the field value of an other field in that record. I want to use 5 different colors for 5 fieldvalues.
In the wizzard (I don't know the english name, I use the Dutch version of access)I can Use 4 colors, a default and 3 other, so that is to less.

I already tried:
If me!status = "1" Then
me!name.forecolor= RGB(255 ,0 ,0)
Else
me!name.forecolor= RGB(0, 0, 255)
End If
this looked to work, however it changes the forecolor in all the fields "name" in all the records in stead of only the record in wich the field "status" has the value 1.
I need this to make visible which of my cars is off duty, wich of my cars has a special task, wich of my cars is free etc etc.
Who can help me?
Thanks
Hans
 
Conditional formatting was the word I didn't know in English. As far as I know I can only use 4 colors. Am I wrong?
 
Do you have Access 2k? If so, then select the control you want to apply conditional formatting to then on the menu select Format... Conditional Formatting...

You can have up to three levels of conditional formatting.
 
Yes, that's right, I use Access 2k and can have up to three levels of conditional formatting. However, I need up to 5 levels and that's why I am looking for a piece of VB code to solve this problem....
thanks for responding
 
Ah, IC. I do not know of a way to facilitate what you're asking for in a continuous form. It would be very easy in a single form but not a continuous one. Sorry.
 
Mr Dennison, thank you very much for the time you spend for me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top