Hi. So far I've used the following to populate a treview control
Private Sub Form_Load()
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "r2", "Contact Types")
nodX.Expanded = True
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child1",
"Audio/Video")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child2", "Auto
Care")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child3", "Bills")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child4", "Computer")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child5",
"Financial")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child6",
"Government")
Set nodX = TreeView1.Nodes.Add("r2", tvwChild, "child7", "Home
Improvement")
End Sub
Instead of setting each child to text I want to use a table (tblContactType)
that
has the Contact Types already stored.
Thanks,
James
Douglas J. Steele - 06 Feb 2006 01:52 GMT
Unforunately, you can't. The TreeView control isn't databound. You have to
add the data manually, as you are.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Hi. So far I've used the following to populate a treview control
>
[quoted text clipped - 27 lines]
> Thanks,
> James
Alex Dybenko - 06 Feb 2006 10:18 GMT
Hi,
you can also look at this sample:
http://www.pointltd.com/Downloads/Details.asp?dlID=36

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> Hi. So far I've used the following to populate a treview control
>
[quoted text clipped - 27 lines]
> Thanks,
> James
Mark Johnson - 06 Feb 2006 10:28 GMT
>Instead of setting each child to text I want to use a table (tblContactType)
>that
>has the Contact Types already stored.
You're doing it right, using Add. As Doug said, the treeview is filled
programmatically.
See this for a more complete example:
http://scenic-route.com/program/vb/ax1.htm
and links on page 5.