Hi
I have a recordset (using oo40) , my records are from a hierachical querie , I would like put in MSHflexgrid with buttom plus (+) that expand others row.
I searched in google, but no find example
Printable View
Hi
I have a recordset (using oo40) , my records are from a hierachical querie , I would like put in MSHflexgrid with buttom plus (+) that expand others row.
I searched in google, but no find example
Might be the language barrier, Eu nao sei, mas...I do not understand what you want. I THINK what you want is to show only a certain number of rows in an MSHFlexGrid, and instead of a scrollbar, you want to put some sort of control on your form to expand more rows below the already 'fixed' rows...is that just about it?
I think he wants to use MSDataShape
here a Linkhttp://www.vbforums.com/showthread.p...-shape-command
EDIT: here a sample with the Northwind Database
IMO 3-4 Levels just look badCode:Option Explicit
Private Cn As New ADODB.Connection
Private Rs As New ADODB.Recordset
Private Sub Command1_Click()
Set Rs = New ADODB.Recordset
Rs.Open "SHAPE {SELECT CustomerID, CompanyName FROM Customers} APPEND ((SHAPE {SELECT * FROM Orders} APPEND ({SELECT * FROM [Order Details]} AS rstOrderDetails RELATE OrderID TO OrderID)) RELATE CustomerID TO CustomerID)", Cn, adOpenForwardOnly, adLockReadOnly
Rs.Requery
Set MSHFlexGrid1.DataSource = Rs
End Sub
Private Sub Form_Load()
Dim strDatabase As String
Set Cn = New Connection
Cn.CursorLocation = adUseClient
strDatabase = "E:\Northwind.mdb"
Cn.Open "PROVIDER=MSDataShape;Data PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabase & ";Jet OLEDB:Database Password='';"
End Sub