*Commandbutton.click * Prepare HFlex Grid with ThisForm.HFlex .Datasource = ThisForm.ADOData.Recordset for ix = 1 to .Cols - 1 .MergeCol(ix) = .t. && Merge cols endfor .MergeCells = 3 endwithRun form. After command window pops up again, click. If errors, check in debugger if "ThisForm.ADOData.Recordset" is .NULL.