>Thanks a lot Martina.
>
>>you can use method of grid or form
Though, if you think of using a debugger while having a method call returning the color, be prepared to meditate a lot. It's evaluated once per cell on each grid refresh; while not much at runtime, with the debugger open, it may take some time, depending on the number of such calls.
The way to circumvent this is to have a iForeColor and iBackColor fields in grid's cursor, which are then taken as dynamic*color expressions - simple field, no calculation. You do calculate once per row and store it - when the values in the row change (when the cursor is populated and in .BRCC()). May even save you a milliwattsecond or two :).