以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何筛选有空的行?或者筛选出内容完整的行?急求!!  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=100028)

--  作者:puresky
--  发布时间:2017/5/3 13:03:00
--  如何筛选有空的行?或者筛选出内容完整的行?急求!!
如题:在foxtable中 如何筛选出有空的行?或者筛选出内容完整的行?急求!!
--  作者:有点色
--  发布时间:2017/5/3 14:20:00
--  

 比如代码

 

Tables("表A").Filter = "第一列 is null or 第二列 is null"

 

Tables("表A").Filter = "第一列 is not null and 第二列 is not null"

 

如果循环所有列,就这样写

 

Dim t As Table = Tables("表A")
Dim str As String = ""
For Each c As Col In t.Cols
    str &= c.name & " is null or "
Next
str = str.Substring(0, str.length-3)
t.filter = str

 

--------------------------------------

 

Dim t As Table = Tables("表A")
Dim str As String = ""
For Each c As Col In t.Cols
    str &= c.name & " is not null and "
Next
str = str.Substring(0, str.length-4)
t.filter = str