I've got this working. Here's the code for anyone interested:
Private Sub Form_Load()
Dim alpha As Long
alpha = 65
ArtistTree.Nodes.Clear
'Populate root level with Capital Letter Alphabet
Do While alpha <= 90
ArtistTree.Nodes.Add , , Chr(alpha), Chr(alpha), "Folder"
alpha = alpha + 1...
Sounds like the SQL statement is the way to go. I may also look at a parameterized query using the QueryDef command. These are supposed to be more efficient, and since I only need to change the WHERE clause in each iteration it may be easier to code. I'll be working on this over the weekend...
gol4,
Thanks for the hint. I'll try that tonight. Every example I've found does it the way I have in my code, but it's worth a try. If this works then it may be easier to use an SQL statement in the OpenRecordset line and put the filter in as a WHERE clause. Intuitively I thought it would...
Nathalie,
For the child nodes the following format is used:
tvTreeView.Nodes.Add ParentNode, tvwChild, key, ChildNodeText
The first parameter is a reference to the parent node that these child nodes will be added under. Without that, all of the nodes are "root" nodes. I think that this is...
Brian,
I don't know if you've solved this yet, but I've got code that fills the root level of a tree control with alphabetical headings. The problem is that filtering the recordset doesn't seem to work. I was putting this together piece by piece and got this far to make sure that the "A" root...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.