Jeff,
I think you just need to turn your statement around a little. From your small code snippet below, my theory is that you have the expressions reversed. I am fairly certain that v_PtObrObx.cptobx_abnormal_change can contain one of the following:
'VL', 'VH', 'L', or 'H'
The $ operator searches the second expression for the first, so try this:
this.colAbnormalChange.DynamicBackColor = ;
"IIF(Alltrim(v_PtObrObx.cptobx_abnormal_change) $ 'VL|VH', RGB(255,128,128), "+;
"IIF(Alltrim(v_PtObrObx.cptobx_abnormal_change) $ 'L|H', RGB(255,255,128), " +;
"RGB(255,255,255)))"
Hope this helps and please let me know if I am not understanding the problem correctly.
>I'm trying to dynamically change the color of individual grid cells based on a conditional statement in the grid's init() method patterned after the VFP 6.0 docs. The syntax is:
>
>this.colAbnormalChange.DynamicBackColor = ;
> "IIF('VL|VH' $ Alltrim(v_PtObrObx.cptobx_abnormal_change), RGB(255,128,128), "+;
> "IIF('L|H' $ Alltrim(v_PtObrObx.cptobx_abnormal_change), RGB(255,255,128), " +;
> "RGB(255,255,255)))"
>
>Anybody see the problem, or have more luck getting grids to change cell colors based upon field values?
>
>TIA
Brian McCord
President
Sagacity Systems