-
I am using an Access Table to populate the nodes on my TreeView control. i.e:
For indx = Asc("A") To Asc("Z")
currentAlpha = Chr(indx)
Set MyNode = TreeView1.Nodes.Add _
(, , currentAlpha, currentAlpha)
This works fine but some of the nodes are empty, i.e they are not expandable.
How can I make these nodes invisible to the user ?
-
You say that you are populating the treeView from a database table.
Can't you constuct the treeview from a select statement on that same table
eg
Code:
Dim strSQL As String
Dim rstTemp As Recordset
strSQL = "SELECT Left([tblName]![Name],1) AS Expr1 From tblName " & _
"GROUP BY Left([tblName]![Name],1)" & _
"ORDER BY Left([tblName]![Name],1);"
Set rstTemp = db.OpenRecordset(strSQL)
With rstTemp
While Not .EOF
Set MyNode = TreeView1.Nodes.Add _
(, , !expr1, !expr1)
.MoveNext
Wend
End With
rstTemp.Close
End Sub
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company