>Public oForm >oForm = Createobject('myForm') >oForm.Show() > >Define Class myForm As Form > DataSession = 2 > Height = 400 > Width = 600 > Add Object myGrid As Grid With RecordSource = 'Customer', ; > Height = 350, Width = 600 > Add Object getDynExpr As CommandButton With Caption = "Din.Expr",Top =360 > > Procedure getDynExpr.Click > Local lcExpr > lcExpr = Thisform.myGrid.Columns(1).DynamicForeColor > Messagebox(Transform(Len(m.lcExpr))+Chr(13)+m.lcExpr) > Endproc > > Procedure Load > Use (_samples+'data\customer') > Endproc > > Procedure Init > Local lcExpr > lcExpr = '(IIF(LEFT(cust_id,1)="C" and country != "USA"'+ > ' and maxordamt >= 1000 and title = "Sales Representative"'+; > ' and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1'+; > ' and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1'+; > ' and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1'+; > ' and 1=1 and 1=1 and 1=1 and 1=1 and 1=1 and 1=1'+; > ' and ATC("c",Company) > 0, RGB(255,0,0), RGB(0,0,0)))' > This.myGrid.Columns(1).DynamicForeColor = m.lcExpr > Endproc >Enddefine >Cetin