有如下表间关联筛选公式如下:
Dim t As Table = Tables("OLT设备端口密码表")
With Tables("GPON口与分纤盒对应关系表")
If .Current Is Nothing Then
t.Filter = "False"
Else
t.Filter = " (机房名称 = '" & .Current("机房名称") & "' and 设备名称 = '" & .Current("设备名称") & "' and 设备端口 = '" & .Current("设备端口") & "' and 是否使用 = False ) or ( 机房名称 is null) "
End If
End With
如果我再增加了一个筛选条件,就会出现了其中【and 是否使用 = False】条件不生效的情况;请问我的命令哪里错啦?
Dim t As Table = Tables("OLT设备端口密码表")
With Tables("GPON口与分纤盒对应关系表")
If .Current Is Nothing Then
t.Filter = "False"
Else
t.Filter = " (机房名称 = '" & .Current("机房名称") & "' and 设备名称 = '" & .Current("设备名称") & "' and 设备端口 = '" & .Current("设备端口") & "' and 是否使用 = False ) or ( 机房名称 is null) or (分纤盒编号 like '%" & .Current("分纤盒编号") & "%') "
End If
End With