Foxtable(狐表)用户栏目专家坐堂 → and 错误


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

主题:and 错误

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


加好友 发短信
等级:幼狐 帖子:160 积分:1214 威望:0 精华:0 注册:2015/7/1 17:35:00
and 错误  发帖心情 Post By:2015/8/4 16:52:00 [只看该作者]

筛选条件,为什么总是出现and操作符错误,代码如下

Dim bm As String =e.Form.Controls("ComboBox1").Value
Dim yg As String =e.Form.Controls("ComboBox2").Value
Dim rq As Date = e.Form.Controls("DateTimePicker1").Value


With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        If Tables("行政主管日常工作1").filter >"" Then
            Tables("行政主管日常工作1").filter = Tables("行政主管日常工作1").filter & " And "
        End If
        Tables("行政主管日常工作1").filter = Tables("行政主管日常工作1").filter & "日期 = #" & .Value & "#"
    End If
End With

With e.Form.Controls("ComboBox1")
    If .Value IsNot Nothing Then
        If Tables("行政主管日常工作1").filter > "" Then
            Tables("行政主管日常工作1").filter = Tables("行政主管日常工作1").filter & " And "
        End If
        Tables("行政主管日常工作1").filter= Tables("行政主管日常工作1").filter & "归属部门 = '" & .Value & "'"
    End If
End With

With e.Form.Controls("ComboBox2")
    If .Value IsNot Nothing Then
        If Tables("行政主管日常工作1").filter > "" Then
            Tables("行政主管日常工作1").filter= Tables("行政主管日常工作1").filter & " And "
        End If
        Tables("行政主管日常工作1").filter = Tables("行政主管日常工作1").filter & "做的好的人 = '" & .Value & "'"
    End If
End With


此主题相关图片如下:q%%kvz%5i3_158m8cdh%v2r.png
按此在新窗口浏览图片

 回到顶部