以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  错提示说:“是否退会”运算符后缺少操作数。是怎么回事啊?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=52268)

--  作者:洗衣粉
--  发布时间:2014/6/12 13:06:00
--  错提示说:“是否退会”运算符后缺少操作数。是怎么回事啊?
Dim cx1,cx2,cx3,cx4,cx5 As WinForm.ComboBox
Dim cx6 As WinForm.TextBox = e.Form.Controls("模糊搜索")
cx1 = e.Form.Controls("入会年份查询")
cx2 = e.Form.Controls("部门")
cx3 = e.Form.Controls("学院")
cx4 = e.Form.Controls("专业")
cx5 = e.Form.Controls("宿舍")
Dim Filter As String
With cx1
    If .Value IsNot Nothing Then
        Filter = "入会年份 = \'" & .text & "\'"
    End If
End With
With cx2
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "所属部门 = \'" & .text & "\'"
    End If
End With
With cx3
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "学院 = \'" & .text & "\'"
    End If
End With
With cx4
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "专业 = \'" & .text & "\'"
    End If
End With
With cx5
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "宿舍楼 = \'" & .text & "\'"
    End If
End With
With cx6
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "姓名 like \'*" & .text & "*\'"
    End If
End With
If Filter > "" Then
    If e.Form.Controls("在会成员").checked = True Then
        Tables("人事资料总览").Filter = Filter & "是否退会 = false"
    End If
    \'If e.Form.Controls("已退会").checked = True Then
        \'Tables("人事资料总览").Filter = Filter & "是否退会 = true"
    \'End If
    If e.Form.Controls("全部成员").checked = True Then
        Tables("人事资料总览").Filter = Filter
    End If
End If


图片点击可在新窗口打开查看此主题相关图片如下:图片1.png
图片点击可在新窗口打开查看

--  作者:blackzhu
--  发布时间:2014/6/12 13:17:00
--  
Tables("人事资料总览").Filter = Filter & " And 是否退会 = false"
--  作者:有点甜
--  发布时间:2014/6/12 14:00:00
--  
If Filter > "" Then
    If e.Form.Controls("在会成员").checked = True Then
        Tables("人事资料总览").Filter = Filter & " and 是否退会 = false"
    End If
    \'If e.Form.Controls("已退会").checked = True Then
        \'Tables("人事资料总览").Filter = Filter & " and 是否退会 = true"
    \'End If
    If e.Form.Controls("全部成员").checked = True Then
        Tables("人事资料总览").Filter = Filter
    End If
End If

--  作者:洗衣粉
--  发布时间:2014/6/12 14:25:00
--  
哦,谢谢啊