LOCAL loForm as Form If MessageBox("Adicionar um campo caracter a MyTable?"+Chr(13)+; "Somente se você responder SIM o problema acontece!"+Chr(13)+Chr(13)+Chr(13)+; "Add a character field in MyTable?"+Chr(13)+; "Just if you anwser YES the problem happens"+Chr(13)+Chr(13)+Chr(13),292,"BUG?") = 6 Set Safety Off Create Table MyTable (Field1 N (4), Field2 N (6,2), Field3 N (12,2), Field4 C (10) ) Set Safety On Insert Into MyTable (Field1, Field2, Field3, Field4) Values (1234, 12.52, 162.35, "RECNO 01") Insert Into MyTable (Field1, Field2, Field3, Field4) Values (2563, 2.24, 62.35, "RECNO 02") Insert Into MyTable (Field1, Field2, Field3, Field4) Values (8542, 36.79, 912.41, "RECNO 03") Insert Into MyTable (Field1, Field2, Field3, Field4) Values (9124, 58.22, 24.35, "RECNO 04") Insert Into MyTable (Field1, Field2, Field3, Field4) Values (9674, 33.28, 152.49, "RECNO 05") Else Set Safety Off Create Table MyTable (Field1 N (4), Field2 N (6,2), Field3 N (12,2)) Set Safety On Insert Into MyTable (Field1, Field2, Field3) Values (1234, 12.52, 162.35) Insert Into MyTable (Field1, Field2, Field3) Values (2563, 2.24, 62.35) Insert Into MyTable (Field1, Field2, Field3) Values (8542, 36.79, 912.41) Insert Into MyTable (Field1, Field2, Field3) Values (9124, 58.22, 24.35) Insert Into MyTable (Field1, Field2, Field3) Values (9674, 33.28, 152.49) EndIf loForm = CREATEOBJECT("Form") loForm.Width = 700 loForm.AddObject("Grade","Grid") With loForm.Grade .Width = 650 .Visible = .T. .RecordSource = "" Set Safety Off Select * From MyTable Into Table MyCursor Set Safety On .RecordSource = "MyCursor" .ColumnCount = 3 && MARQUE AQUI APENAS AS 3 PRIMEIRAS With .Column1 .ControlSource = "Field1" .InputMask = "9,999" .Width = 100 .Header1.caption = "1" EndWith With .Column2 .ControlSource = "Field2" .InputMask = "999.99" .Width = 100 .Header1.caption = "2" EndWith With .Column3 .ControlSource = "Field3" .InputMask = "999,999,999.99" .Width = 100 .Header1.caption = "3" EndWith EndWith && DEPOIS QUE CRIOU AS PRIMEIRAS, AS DEMAIS NÃO SÃO REGISTRADAS AUTOMATICAMENTE loForm.grade.ColumnCount = 4 With loForm.Grade.column4 .ControlSource = "Round(Field2 * Field3,2)" .InputMask = "999,999,999.99" .Width = 100 .Header1.caption = "4" endwith loForm.Show(1)Se desejar fazer isso com todas, teria que deixar o "columncount=-1" e ir incrementando e formatando as columns conforme sua necessidade.