>I would like to have a grid Dynamically color negative values in red. I know this involves the DynamicForeColor Property, but I seem to be having a problem getting it to work properly. I have tried the following code:
>
>for mclr = 1 to thisform.grid1.columncount
>
>thisform.grid1.setall("DynamicForeColor", "iif(thisform.grid1.columns(mclr).text1.value < 0,RGB(255,0,0),RGB(0,0,0))","Column")
>
>endfor
>
>The columns that actually contain numeric data varies but always starts at column 3. Do I need to look at each column individually?
>
>Thanks,
>
Scott,
Don't look at the columns at all, look at the recordsource field;
thisform.grid1.setall("DynamicForeColor", "iif(Alias.FieldName < 0,RGB(255,0,0),RGB(0,0,0))","Column")