问题是:修改加上月份区分之后{TVW.Nodes.Add ndMonth.Key, tvwChild, ndMonth.Key & "D" & rs.Fields("部门"), rs.Fields("部门")},在NodeClick中改如何来叫这个节点呢?好像现在Case Is = "D"都没用了!请Tiger_Zhao老师指点下!Private Sub TreeView1_NodeClick(ByVal Node As ComctlLib.Node)
Dim treeFlag As String
Dim treepath, a, b, c As String
Dim ndMonth As Node
treeFlag = Left(Node.Key, 1)Select Case treeFlag
    Case Is = "A"
            Me.ListView1.ListItems.Clear
            
    Case Is = "B"
            Me.ListView1.ListItems.Clear
            
    Case Is = "C"
            Me.ListView1.ListItems.Clear
            
    Case Is = "D"
            
            SQL = "select * from ll where 部门='" & Replace(Node.Text, "'", "''") & "'"
            Call addLIST
End Select
End Sub
Private Sub LSTVW(ByVal TVW As ComctlLib.TreeView)
Dim a, b, c, D As String
Dim ndRoot As Node
Dim ndYear As Node
Dim ndMonth As Node
Dim ndBM As NodeTVW.Nodes.Clear
Set ndRoot = TVW.Nodes.Add(, , "A", SyJL)Call OpenConn
SQL = "select 所属年份,所属年月份,部门 from ll"
rs.Open SQL, cn, 1, 1
Do While Not rs.EOF
On Error Resume Next
 
  Set ndYear = GetNode(TVW, ndRoot.Key, "B" & rs.Fields("所属年份"), rs.Fields("所属年份"))
  Set ndMonth = GetNode(TVW, ndYear.Key, "C" & rs.Fields("所属年月份"), rs.Fields("所属年月份"))
  TVW.Nodes.Add ndMonth.Key, tvwChild, ndMonth.Key & "D" & rs.Fields("部门"), rs.Fields("部门")
  
rs.MoveNext
Loop
End Sub