"JohnE" <JohnE[ at ]discussions.microsoft.com> wrote in message news:384A0E07-9BDB-4067-B70C-9D7D2888BC2E[ at ]microsoft.com...
[Quoted Text] > Hello. I have a main form that has a treeview (parent and child) on it > and a > tab control with subforms and textboxes. The treeview control works and > displays just what is needed. But, I am lost as to how to make a record > appear on the tab control when a child in the treeview is selected. I > have > used a combobox or listbox after update event in the past to have the > selected record information displayed. Need to get the treeview child > selection to do the same. > Can anyone help out on this or point me in the right direction to a > sample/example? > Thanks... John
Use the Treeview's NodeClick event and refer to Node.Text to obtain the value to filter the form to the correct record. Something like:
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node) Me.Filter = "MyFieldName = '" & Treeview1.Text & "'" Me.FilterOn = True End Sub
|