以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  请教大神,这里AND的用法错在哪里  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=63321)

--  作者:nclo
--  发布时间:2015/1/18 21:46:00
--  请教大神,这里AND的用法错在哪里
If User.Group = "开发者" Then
     DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
End If
If User.Name = "jialing" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "嘉陵区" & "\'" And
      DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "shunqing" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "顺庆区" & "\'" And
      DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "gaoping" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "高坪区" & "\'" And
    DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "langzhong" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "阆中市" & "\'" And
    DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "nanbu" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "南部县" & "\'" And
     DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "xichong" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "西充县" & "\'" And
    DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "yingshan" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "营山县" & "\'" And
     DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "pengan" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "蓬安县" & "\'" And
       DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
Else If User.Name = "yilong" Then
    DataTables("表A").LoadFilter = "第1列 = \'" & "仪陇县" & "\'" And
      DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"
End If
DataTables("表A").Load()



报错说不是表达式。请教大神!!!!严重感谢!!

--  作者:有点甜
--  发布时间:2015/1/18 21:49:00
--  
    DataTables("表A").LoadFilter = "第1列 = \'" & "嘉陵区" & "\'" And
    DataTables("表A").LoadFilter = "第14列 = 0 and 第3列 Is Not Null"

 

改成

 

    DataTables("表A").LoadFilter = "第1列 = \'" & "嘉陵区" & "\' And 第14列 = 0 and 第3列 Is Not Null"

 

其他照着改