With ThisForm.GrdData .RecordSource = "" .ColumnCount = -1 && Release all column objects, *notes Select Customer .RecordSource = "Customer" .Init && If you give some proc on init to setting the grd, such as textbox, header... .Refresh EndWith*Notes: Once you change the GrdData.recordsource, all columns objects are auto-Reset.
* GrdData.Init With This For iX = 1 to .ColumnCount .Columns[iX].RemoveObject([text1]) IF TYPE(.Columns[iX].Controlsource) = [N] .Columns[iX].AddObject([text1], [txtNum]) && self-numeric textbox class ELSE .Columns[iX].AddObject([text1], [txt]) && self-define own text, you can put code here. ENDIF .Columns[iX].text1.fontsize = 11 .Columns[iX].text1.fontname = "Arial" .Columns[iX].text1.visible = .T. && default visible value was .F. by Addobject() EndFor EndWith