Foxtable(狐表)用户栏目专家坐堂 → 查询


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

主题:查询

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109501 积分:557173 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/7/3 12:02:00 [显示全部帖子]

参考:http://www.foxtable.com/webhelp/topics/1058.htm,比如

Dim str() As String = {"外框","内叶","安装"}
Dim Filter As String = "1=2"

For Each s As String In str
    Filter = Filter & "or ("
    With e.Form.Controls("ComboBox1")
        If .Value IsNot Nothing Then
            Filter = s & "完成人员 = '" & .Value & "'"
        End If
    End With
    With e.Form.Controls("StartDate")
        If .Value IsNot Nothing Then
            If Filter >"" Then
                Filter = Filter & " And "
            End If
            Filter = Filter &s & "完成时间 >= #" & .Value & "#"
        End If
    End With
    With e.Form.Controls("endDate")
        If .Value IsNot Nothing Then
            If Filter >"" Then
                Filter = Filter & " And "
            End If
            Filter = Filter &s & "完成时间 <= #" & .Value & "#"
        End If
    End With
    Filter = Filter & ")"
Next
msgbox(Filter )
……

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109501 积分:557173 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/7/12 20:36:00 [显示全部帖子]

请上传具体实例说明问题

 回到顶部