>Can someone help me with this code. I want to display the text in a row as green if there is no priority and date is past due. The following code leaves all the rows black.
>
>foreexpr = 'IIF(ALLTRIM(myscLoc.priority) == "High",' + LTRIM(STR(RGB(255,0,0))) + ',IIF(ALLTRIM(myscLoc.priority) == "Medium",' + ;
> LTRIM(STR(RGB(0,0,255))) + ',IIF(myscLoc.dmdate) <' + DTOC(Date()) + ',' + LTRIM(STR(RGB(0,255,0))) + ',' + LTRIM(STR(RGB(0,0,0))) +')))'
>
> THIS.SETALL("DynamicForeColor",foreexpr,"Column")
foreexpr = 'IIF(ALLTRIM(myscLoc.priority) == "High",' + STR(RGB(255,0,0))+ ;
',IIF(ALLTRIM(myscLoc.priority) == "Medium",' + STR(RGB(0,0,255)) + ;
',IIF(myscLoc.dmdate < Date(),' + STR(RGB(0,255,0)) + ',' + STR(RGB(0,0,0)) +')))'
THIS.SETALL("DynamicForeColor",foreexpr,"Column")
However it would be easier if you do :
THIS.SETALL("DynamicForeColor","(thisform.GetStatus())","Column")
and in custom form method return color value based on your criteria.
Cetin