Private Sub TreeView_NodeClick(ByVal Node As Object)
Dim str As String
str = ""
If Node.Text = "省份" Then
str = ""
If Node.Text = Node.Key Like "父" Then
str = "[省市名称]='" & Node.Text & "'"
End If
Else
If Left(Node.Key, 1) = "父" Then
str = "[省市名称]='" & Mid(Node.Key, 2) & "'"
Else
str = "[城市名称]='" & Node.Text & "'"
End If
End If
Me.查询窗体.Form.FilterOn = True
Me.查询窗体.Form.Filter = str
End Sub作者: leijiqiang 时间: 2010-3-25 17:50
兄弟,你的树图规化的不好~第二层,又有市,又有省.逻辑思维乱.