For Each loColumn In ThisForm.Grid1.Columns *!* some non interesting code... If lcField = "M" With loColumn .AddObject("cmdMemoEdit1", "ccmdMemoEdit") .AddObject("cmdMemoEdit2", "ccmdMemoEdit") .cmdMemoEdit1.ForeColor = Rgb(0, 0, 255) .DynamicCurrentControl = "Iif(!Empty( " + lcFieldName + "), 'cmdMemoEdit1', 'cmdMemoEdit2')" .Sparse = .F. .CurrentControl = "cmdMemoEdit1" .cmdMemoEdit1.Visible = .T. .cmdMemoEdit2.Visible = .T. .cmdMemoEdit1.Height = .Text1.Height .cmdMemoEdit2.Height = .Text1.Height .Width = 50 .RemoveObject("Text1") EndWith EndIf *!* some non interesting code... EndForhth,