LPARAMETER ldDOB, llsex age = (date() - ldDOB)/365.25 DO CASE CASE age >= 0 and age < 12 nColor = iif(llsex=0,RGB(0,0,0),RGB(0,0,100)) CASE age >= 12 and age < 18 nColor = iif(llsex=0,RGB(100,0,0),RGB(100,0,100)) CASE age >= 18 and age < 30 nColor = iif(llsex=0,RGB(200,0,0),RGB(200,0,100)) CASE age >= 30 and age < 60 nColor = iif(llsex=0,RGB(0,100,0),RGB(0,100,100)) CASE age >= 60 nColor = iif(llsex=0,RGB(0,200,0),RGB(0,200,100)) ENDCASE Return nColorIn Grid's Init
ogrd.SetAll("DynamicBackColor", "thisform.getAge(client.age,client.sex)", "Column")Of course, you can set the display options as you like, e.g. you can display ICONs, instead of changing the fontcolor