Foxtable(狐表)用户栏目专家坐堂 → [求助]筛选能否用加载条件来取代


  共有2826人关注过本帖树形打印复制链接

主题:[求助]筛选能否用加载条件来取代

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/9/28 13:04:00 [显示全部帖子]

Dim nms() As String = {"年级","班级","学号","姓名"}  '定义一个组合框数组
Dim sps() As String = {"'","'","'","'"} '定义一个间隔符数组
Dim bjf() As String = {" = "," = "," = "," = "} '定义一个比较符合数组
Dim fds() As String = {"年级","班级","学号","姓名"} '定义比较的列
Dim filter As String
For i As Integer = 0 To nms.length -1
    If e.Form.controls(nms(i)).value IsNot Nothing Then
        If filter > "" Then
            filter = filter & " And "
        End If
        filter = filter & fds(i) & bjf(i) & sps(i) & e.Form.controls(nms(i)).value & sps(i)
    End If
Next
Tables("导入学生_学生信息表").datatable.loadfilter = filter

Tables("导入学生_学生信息表").datatable.load


 回到顶部