参考代码
Dim nd As WinForm.TreeNode = e.node
Dim dr As DataRow = nd.DataRow
Dim idxs As String = ""
If nd.Level = 0 Then
idxs = dr.DataTable.GetComboListString("编号", "省 = '" & dr("省") & "'").replace("|", "','")
ElseIf nd.Level = 1 Then
idxs = dr.DataTable.GetComboListString("编号", "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "'").replace("|", "','")
ElseIf nd.Level = 2 Then
idxs = dr.DataTable.GetComboListString("编号", "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 客户名称 = '" & dr("客户名称") & "'").replace("|", "','")
End If
msgbox(idxs)
Tables("订单表").filter = "客户编号 in ('" & idxs & "')"