Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
小妹妹,高级筛选窗口不是这么做的。
比较命令列不需要,保留前三列,最后单击一个按钮,根据用户的输入合成条件表达式,系统的高级筛选窗口就是这么做的。
能分享一下吗? 谢谢老师了~
if e.datacol.name = "内容" orelse e.datacol.name = "连接" orelse e.datacol.name = "列" orelse e.datacol.name = "比较" then
If Currenttable.position = 0 Then
If CurrentTable(0,"内容") = nothing Then
CurrentTable(0,"比较命令") = nothing
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
if CurrentTable(0,"比较命令") <> ""
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
else
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
CurrentTable(r,"比较命令") = CurrentTable(r,"比较命令").replace(CurrentTable(1,"连接"),"")
end if
end if
Next
else
Dim r0 As Row = Tables("表A").Rows(0)
r0("比较命令") = "[" & r0("列") & "] " & r0("比较") & " '" & r0("内容") & "'"
if Currenttable.position+1 < Currenttable.count -1 then
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
end if
Next
end if
end if
end if
If Currenttable.position > 0 Then
Dim d As string
d = CurrentTable.current("编号")
if CurrentTable.current.isnull("内容") then
CurrentTable.current("比较命令") = nothing
if Currenttable.position +1 <= Currenttable.count -1 then
For r2 As integer = Currenttable.position +1 to Currenttable.count -1
if CurrentTable(r2,"内容") <> "" then
CurrentTable(r2,"比较命令") = CurrentTable(r2,"比较命令").replace(CurrentTable(Currenttable.position,"连接") & " " & "[" & CurrentTable(Currenttable.position,"列") & "] " & CurrentTable(Currenttable.position,"比较") & " '" & d & "'" ," ")
end if
Next
end if
else
CurrentTable(Currenttable.position ,"比较命令") = CurrentTable(Currenttable.position -1,"比较命令") & CurrentTable(Currenttable.position ,"连接") & " " & "[" & CurrentTable(Currenttable.position ,"列") & "] " & CurrentTable(Currenttable.position ,"比较") & " '" & CurrentTable(Currenttable.position ,"内容") & "'"
if Currenttable.position+1 <= Currenttable.count -1 then
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
end if
Next
end if
end if
end if
end if
if e.datacol.name = "内容" orelse e.datacol.name = "连接" orelse e.datacol.name = "列" orelse e.datacol.name = "比较" then
If Currenttable.position = 0 Then
If CurrentTable(0,"内容") = nothing Then
CurrentTable(0,"比较命令") = nothing
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
if CurrentTable(0,"比较命令") <> ""
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
else
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
CurrentTable(r,"比较命令") = CurrentTable(r,"比较命令").replace(CurrentTable(1,"连接"),"")
end if
end if
Next
else
Dim r0 As Row = Tables("表A").Rows(0)
r0("比较命令") = "[" & r0("列") & "] " & r0("比较") & " '" & r0("内容") & "'"
if Currenttable.position+1 < Currenttable.count -1 then
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
end if
Next
end if
end if
end if
If Currenttable.position > 0 Then
Dim d As string
d = CurrentTable.current("编号")
if CurrentTable.current.isnull("内容") then
CurrentTable.current("比较命令") = nothing
if Currenttable.position +1 <= Currenttable.count -1 then
For r2 As integer = Currenttable.position +1 to Currenttable.count -1
if CurrentTable(r2,"内容") <> "" then
CurrentTable(r2,"比较命令") = CurrentTable(r2,"比较命令").replace(CurrentTable(Currenttable.position,"连接") & " " & "[" & CurrentTable(Currenttable.position,"列") & "] " & CurrentTable(Currenttable.position,"比较") & " '" & d & "'" ," ")
end if
Next
end if
else
CurrentTable(Currenttable.position ,"比较命令") = CurrentTable(Currenttable.position -1,"比较命令") & CurrentTable(Currenttable.position ,"连接") & " " & "[" & CurrentTable(Currenttable.position ,"列") & "] " & CurrentTable(Currenttable.position ,"比较") & " '" & CurrentTable(Currenttable.position ,"内容") & "'"
if Currenttable.position+1 <= Currenttable.count -1 then
For r As integer = 1 to Currenttable.count -1
if CurrentTable(r,"内容") <> "" then
CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] " & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
end if
Next
end if
end if
end if
end if
昏!天书一般.