Jump to content
Sign in to follow this  
bigedmustafa

Script for Changing Text Colour

Recommended Posts

I am trying to set up a database that has a field containing a risk level (Low, Medium, High). What I need is a script which will change the colour of the text in the field to either Red, Yellow, Green depending on the contents.

Can't quite figure out the best way to do this.

Share this post


Link to post
Share on other sites

Case(

risk level = "Medium"; TextColor ( "Medium" ; RGB ( 255 ; 255 ; 0 ) );

risk level = "Hight"; TextColor ( "Hight" ; RGB ( 255 ; 0 ; 0 ) );

TextColor ( "Low" ; RGB ( 0 ; 255 ; 0 ) )

)

BTW: if the field that have to change its colour is the same ( risk level ), you can enter this calc into the option of autoenter a calc for the field: risk level:

Case(

risk level = "Medium"; TextColor ( risk level ; RGB ( 255 ; 255 ; 0 ) );

risk level = "Hight"; TextColor ( risk level ; RGB ( 255 ; 0 ; 0 ) );

TextColor ( risk level ; RGB ( 0 ; 255 ; 0 ) )

)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.