Foxtable(狐表)用户栏目专家坐堂 → 数据提取问题


  共有11509人关注过本帖平板打印复制链接

主题:数据提取问题

帅哥哟,离线,有人找我吗?
jhxb8821
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:648 积分:4722 威望:0 精华:0 注册:2016/4/15 22:24:00
  发帖心情 Post By:2023/8/15 8:24:00 [只看该作者]

Dim nms As String() = {"产品", "客户", "雇员"} '指定生成目录树的各列

Dim qts As String() = {"'", "'", "'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号

Dim trv As WinForm.TreeView = e.Sender

Dim flt As String

Dim nd As WinForm.TreeNode

 

Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView2")

For Each nd1 As WinForm.TreeNode In e.Node.AllNodes '清除子节点的选中标记

    nd1.Checked = e.Node.Checked

Next

Dim pd As WinForm.TreeNode = e.Node.ParentNode

If pd IsNot Nothing Then

    Dim bb As Boolean = True

    For Each nd2 As WinForm.TreeNode In pd.Nodes

        If nd2.Checked = False Then

            bb = False

            Exit For

        End If

    Next

    pd.Checked = bb

End If

 

For Each nd In trv.AllNodes

    If nd.Checked Then

        Dim rts() As String = nd.FullPath.Split("\")

        Dim val As String = ""

        For i As Integer = 0 To rts.length - 1

            If val > "" Then

                val = val & " And "

            End If

            val = val & nms(i) & " = " & qts(i) & rts(i) & qts(i)

        Next

        If flt > "" Then

            flt = flt & " Or (" & val & ")"

        Else

            flt = val

        End If

    End If

Next

Tables("订单").Filter = flt

请蓝老师帮忙完善一下


 回到顶部
总数 116 1 2 3 4 5 6 7 8 9 10 下一页 ..12