tv=left(allt(ThisForm.txtinv.value),3) This.SetAll("DynamicForeColor","iif(len(tv)<3,rgb(255,255,255),iif(tv='aaa',rgb(255,255,128),iif(tv='ddd' ortv='eee',rgb(255,0,0))")