If I understood you right in the tet bo the user enter the invoice number, and after that you populate the grid. In the cursor You have products ID and you want each produc to be displaied with different forecolor. To do that After You populate the grid put this code:
thisform.GrdInvRes.SetAll("DynamicForeColor","IIF(YourCursor.ProdId='aaa',RGB(put_rgb_color),IIF(YourCursor.ProdId='bbb',RGB(put_rgb_color),RGB(put_rgb_color_default)))","Column")
thisform.GrdInvRes.Refresh()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.