July 9, 200421 yr I want the text color of field X to be dependent on which of two values is present in field Y. It should be simple but I'm super busy right now and not thinking straight. Any Suggestions? Thanks
July 9, 200421 yr A search would display many posts on the subject. One such post is: Conditionally Color Text
July 9, 200421 yr That post seems to refer to a TextColor function, which is to be found in FM7. It looks like the original poster is working in FM6. There are many ways to do this, but as I happened to just finish setting something like this up, here's what I did. (I assume that the resulting field X is for display only and that data will not be entered into it. If this is not the case, follow Moonshadow's advice & search. There are lots of different ways to do the job.) I made two calculation fields, result text (I am displaying a message). Let's say the two values that can be in field Y are A and B. Make the calculation for the first new field, call it X_A: Case (Field_Y = "A", "Red Text", "") The second field, X_B would be: Case (Field_Y = "B", "Blue Text, "") Format field X_A the font & size you wish, and select the text color to be red. Use for format painter and copy the X_A formatting to X_B, then reselct the text color to be blue. Make sure both fields (in layout mode) are exactly the same size. Put one exactly on top of the other. Now, in browse mode, change the contents of Field Y and watch the double field X change. As I said, if field X is to have actual data, this can be done but it's a bit trickier. Easy if data doesn't need to be directly entered, tougher if it does. Steve Brown
July 9, 200421 yr Note that Case (Field_Y = "A", "Red Text") will work as well, without the superfluous alternate null result.
July 9, 200421 yr Apologies for not noticing your version. I am usually more careful about offering suggestions based upon version. I guess my head is so much in 7 that I momentarily forgot there is another world out there.
Create an account or sign in to comment