ShowMe(oRS, 'My Caption') Function ShowMe Lparameters toRecordset,tcCaption oForm = Createobject('myForm',toRecordset, tcCaption) 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 toRecordset,tcCaption This.Caption = iif(empty(m.tcCaption), '', m.tcCaption) This.hflex.Datasource = toRecordset this.hflex.AllowUserResizing = 3 Endproc Procedure QueryUnload Clear Events Endproc EnddefineCetin