However, I'm getting an error after adapting your code as follows:It would certainly have been more helpful if you had told us
what error you were getting < s >.
oGrd.Column7.DynamicBackColor = [IIf(ogrd.column7.text1.value<40,RGB(255,0,0),RGB(255,255,255))]Where is this code? Is it in the form? Why don't you just move it to the grid's Init() and ammend as follows:
This.Column7.DynamicBackColor = [IIf( << the field in the RecordSource Bound to column 7 >> <40,RGB(255,0,0),RGB(255,255,255))]
You want the condition to refere to the data in the grid's RecordSOurce, not its embedded controls.
I am also assuming that the error has something to do with the fact that VFP has no clue what oGrd is. If the code is in the form, you have to use the fully qualified containership hierarchy to refer to objects on it: Thisform.oGrd.