>>>I have SetAll in .init already and that's fine for when I load the form, but I want to set the color myself for just the row the user updates.
>>>Actually the user has focus on a textbox where they use a barcode scanner to input a value, then I want to locate the row and change the color of that row. The criteria would be the same but the scope really only needs to be that one record at that point.
>>
>>Your code should evaluate new form property, e.g. gridrecno. In Grid.BeforeRowColumnChange you will set this property:
>>
>>Thisform.gridrecno=recno(this.recordsource)
>>
>>and in Grid.AfterRowColumnChange you will check if grid.refresh is required,
>>
>>If Thisform.gridrecno=recno(this.recordsource)
>> return
>>endif
>>This.Refresh
>>
>>DynamicColor expressions should evaluate if Thisform.gridrecno=recno('gridsourcealias'). By the way, you don't need to include long expressions there. You may just have form's method called, e.g.
>>
>>This.Column1.DynamicBackColor="0+thisform.setgridcolor()"
>>
>>The first thing in Setgridcolor would be checking Thisform.gridrecno.
>
>Should you assign Column.BackColor here instead?
>
>Nice idea, BTW.
Form's method will return value used in DynamicBackColor expression. It is very old trick created on UT more than 10 years ago.
Edward Pikman
Independent Consultant