Use "tablesamp" in 0 shared With ThisForm.GridGeneral1 .RecordSource = "tablesamp" .Refresh() .LayoutRefresh("cProj,The Project") EndWithAnd here is the LayoutRefresh code. First I split the passed parameter on the comma, and take the first part as the column/textbox control source, and take the second as the header. The header shows fine, but not the textbox stuff.
Parameters nLType , cCol1 , cCol2 , cCol3 , cCol4 , cCol5 This.ColumnCount = 0 If VarType(cCol1) ="C" nItemCount = Occurs( "," , cCol1 ) + 1 Dimension arItems[nItemCount,1] aItems = "" nLastPos = 1 For nCnt = 1 to nItemCount If nCnt < nItemCount arItems[nCnt,1] = SubStr( cCol1 , nLastPos , ; ( At ( "," , cCol1 , nCnt) -1 ) - nLastPos +1 ) Else arItems[nCnt,1] = SubStr( cCol1 , nLastPos , ; ( Len ( cCol1 ) - nLastPos ) + 1) EndIf nLastPos = At( "," , cCol1 , nCnt ) +1 EndFor EndIf This.ColumnCount = This.ColumnCount + 1 With This.Columns(This.ColumnCount) .Width = 50 .Header1.Caption = arItems[2] .Header1.FontName = "Tahoma" .Header1.FontBold = .t. .Header1.FontSize = 8 EndWith With This.Columns(This.ColumnCount).Text1 .ControlSource = arItems[1] .FontName = "Tahoma" .FontBold = .f. .FontSize = 8 .Width = 50 EndWith ? Chr(9) +Chr(9) +Chr(9) + arItems[1] ? Chr(9) +Chr(9) +Chr(9) + arItems[2]Help!