...DynamicBackColor = "IIF( MyField = 'M', RGB(255,0,0), RGB(0,0,255) )"You're also free to call self defined function to calculate the colors:
...DynamicBackColor = "ThisForm.CalculateColor( "MyField", MyField )" ------------------ * ThisForm.CalculateColor LPARAMETER tcFieldName, tuFieldValue * do something depending on tcFieldName, tuFieldValue * to fill the return value ... RETURN lnColorBTW: Be aware of having a lot of code called by DynamicColor makes the grid slow!