|
-
Jan 10th, 2019, 12:20 PM
#1
Thread Starter
Fanatic Member
Populate MSHFLEXGRID with 3 or 4 levels
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
-
Jan 11th, 2019, 11:21 AM
#2
Re: Populate MSHFLEXGRID with 3 or 4 levels
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?
-
Jan 11th, 2019, 11:34 AM
#3
Re: Populate MSHFLEXGRID with 3 or 4 levels
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
Code:
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
IMO 3-4 Levels just look bad
Last edited by ChrisE; Jan 11th, 2019 at 12:12 PM.
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|