Office中国论坛/Access中国论坛

标题: 请教竹笛:nodeclick事件如何使用? [打印本页]

作者: lexy2k    时间: 2006-9-29 23:50
标题: 请教竹笛:nodeclick事件如何使用?
在form类模块中,写入下代码,出错,求助高手竹笛。

Private WithEvents Treevw As TreeView
Private Sub Form_Load()
    treeLoad
    Set Treevw = Me.TreeView.Object
End Sub

Private Sub treeLoad()
'* -----------------------------------------------------------------
    Dim Rec As New ADODB.Recordset
    Dim stRecQL As String
    Dim Item As Integer
    Dim i As Integer
    Dim nodindex As Node
'* -----------------------------------------------------------------
    '设置最顶级"
    Set nodindex = TreeView.Nodes.add(, , "f0", "预算方案", "K1", "K2")
    nodindex.Sorted = True
'* -----------------------------------------------------------------
    '设置第二级
    Rec.Open "gl_期间", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTableDirect
    For i = 0 To Rec.RecordCount - 1
        Set nodindex = TreeView.Nodes.add("f0", tvwChild, "qj" & Rec.Fields("期间_ID"), Rec.Fields("期间_NO"), "K1", "K2")
        nodindex.Sorted = True
        Rec.MoveNext
    Next
    Rec.Close
End Sub


Private Sub Treevw_NodeClick(ByRef Node As Object)
End Sub





欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3