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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    2 members have viewed this topic:
    NLR  sfpx 
×
×
  • Create New...

Important Information

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