I need help ....
I built a form contains a textbox, a treeview, and an ADO controls. I've set up 
the
connection string and could use the ADO buttons to move thorough a database 
file 
and displayed its records in the textbox (movenext, moveprevious, movefirst, &
movelast)
the problem is about treeview control. i want make it as an 'explorer' for the
database records, so i can jump to a specific record (row) directly with only 
one or
two clicks.
i built the treeview nodes like this:
'----------------------
Dim nodex as Node
Dim i As Integer
Set tvwDA.ImageList = ImageList1
    Set nodex = tvwDA.Nodes.Add(, , "top", "Company List")
        nodex.ExpandedImage = "close"
        nodex.Expanded = True
    Set nodex = tvwDA.Nodes.Add("top", tvwChild, "company1", "Astra")
        For i = 1 To 7
        Set nodex = tvwDA.Nodes.Add("company1", tvwChild, "company1" & "-" & i, 
i)
        Next
    Set nodex = tvwDA.Nodes.Add("top", tvwChild, "company2", "Ford")
        For i = 1 To 100
        Set nodex = tvwDA.Nodes.Add("company2", tvwChild, "company2" & "-" & i, 
i)
        Next
    Set nodex = tvwDA.Nodes.Add("top", tvwChild, "company3", "Boeing")
        For i = 1 To 200
        Set nodex = tvwDA.Nodes.Add("company3", tvwChild, "company3" & "-" & i, 
i)
        Next
'--------------------------
i put the code below, but here is the problem, it doesn't work as i want.
Private Sub tvwDA_DblClick()
If tvwDA.SelectedItem.Children > 0 Then
    Exit Sub
Else
    If tvwDA.SelectedItem.Text = 1 Then                  ' probably this line 
and / or the next line is wrong code
    Adodc1.Move 10                               
    End If
End If
end sub

                
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To reply to this message, go to:
    
http://groups.yahoo.com/group/visualbasic6programming/post?act=reply&messageNum=18548
    Please do not reply to this message via email. More information here:
    http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> To visit your group on the web, go to:  
    http://groups.yahoo.com/group/visualbasic6programming/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to