Hi Chaim, There is no need to add this code in Grid\Refresh method, Just add it in INIT method of the form:
tv="left(allt(ThisForm.txtinv.value),3)"
Thisform.Grid1.SetAll("DynamicForeColor","iif(len("+tv+")<3,rgb(255,255,255),iif("+tv"='aaa',rgb(255,255,128),iif("+tv"='ddd' or "+tv+"='eee',rgb(255,0,0))","Column")
Pls check for sintax errors after pasting this :o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.