Hi Alex,
Do you mean a TreeView control, when you say "Tree List"? If so, it's not
hard, but the exact answer depends on how you've populated your treeview
control. If you've done so using the ID Number as the key for each node,
then it's as simple as this (also assuming that when you say "text field"
you mean a textbox control on your form):
Private Sub YourTreeViewControl Name_NodeClick(ByVal Node As Object)
Me.YourTextboxControlName = Node.Key
End Sub
If you don't have the ID Number as the key - perhaps it's the Node.Text -
then you'd use that. If it's not attached to the node at all, then you'd
need to get it via a dLookup from the Node.Key or Node.Text or ... You may
need to requery the form to get the ID Number to appear.
Note also that the NodeClick event of the treeview control is not listed in
the Event tab of the property dialog box; you have to access it via the
combo-boxes in the Visual Basic editor - select the treeview control in the
left-hand combo, then the NodeClick event in the right-hand combo.
If you want some examples of how to use/program a treeview control, the best
one that I've found is Alex Dybenko's at
http://www.pointltd.com/Downloads/Details.asp?dlID=36
HTH,
Rob