#define XMLFile 'myXML.xml' Local oRecordSet As ADODB.Recordset Local oConn As ADODB.Connection strCn = "Provider = MSDAOSP; Data Source=MSXML2.DSOControl.2.6;" oRecordSet = Createobject("adodb.recordset") oConnection = Createobject("adodb.connection") With oConnection .Provider = "MSDataShape" .ConnectionString = strCn .Open Endwith oRecordSet.Open(XMLFile,oConnection) ShowMe('Contents',oRecordSet) Function ShowMe Lparameters tcCaption,toRecordset oForm = Createobject('myForm', tcCaption,toRecordset) oForm.Show Read Events Endfunc Define Class myform As Form Height = 450 Width = 750 Name = "Form1" Add Object hflex As OleControl With ; Top = 10, Left = 10, Height = 430, Width = 730, Name = "Hflex", ; OleClass = 'MSHierarchicalFlexGridLib.MSHFlexGrid' Procedure Init Lparameters tcCaption,toRecordset This.Caption = tcCaption This.hflex.Datasource = toRecordset This.hflex.CollapseAll Endproc Procedure QueryUnload Clear Events Endproc EnddefineCetin