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