Foxtable(狐表)用户栏目专家坐堂 → 选中行后筛选


  共有3925人关注过本帖树形打印复制链接

主题:选中行后筛选

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


加好友 发短信
等级:九尾狐 帖子:2701 积分:17993 威望:0 精华:0 注册:2013/4/9 10:41:00
  发帖心情 Post By:2020/6/12 16:55:00 [只看该作者]

谢谢老师 感谢,还有一点点小问题,

老师 可以让两个不同颜色的代码单独执行吗?因为中途有个 return,把后面的代码也拦截了,每段的return可以只这段自己的的那段代码吗 感谢 感谢 
Dim t As Table = e.Form.Controls("Table1").Table
For Each r As Row In t.GetCheckedRows
    If lst.contains(r("_Identify")) = False
        lst.Add(r("_Identify"))
    End If
Next
Dim s As String = ""
For Each r As Row In Tables("采订录入窗口_Table1").GetCheckedRows
    s =s & "," & r("_Identify")
Next

If s = "" Then
    t.Filter = "false"
    Return
End If

s = s.Trim(",")
t.Filter = "[_Identify] in (" & s & ")"

For Each r As Row In t.Rows
    If lst.Contains(r("_Identify")) Then
        r.Checked  = True
    End If
Next
'End If

'If Tables("采订录入窗口_Table2").Current IsNot Nothing  '窗口没有显示的时候
'Else '否则
Dim t1 As Table = e.Form.Controls("Table2").Table
For Each r As Row In t1.GetCheckedRows
    If lst.contains(r("_Identify")) = False
        lst.Add(r("_Identify"))
    End If
Next
Dim s1 As String = ""
For Each r As Row In Tables("采订录入窗口_Table2").GetCheckedRows
    s1 =s1 & "," & r("_Identify")
Next

If s = "" Then
    t1.Filter = "false"
    Return
End If

s1 = s1.Trim(",")
t1.Filter = "[_Identify] in (" & s1 & ")"

For Each r1 As Row In t1.Rows
    If lst.Contains(r1("_Identify")) Then
        r1.Checked  = True
    End If
Next
'End If

 回到顶部
帅哥,在线噢!
有点蓝
  22楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:105484 积分:536411 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/6/12 17:16:00 [只看该作者]

For Each r As Row In Tables("采订录入窗口_Table1").GetCheckedRows
    s =s & "," & r("_Identify")
Next

If s = "" Then
    t.Filter = "false"
else
s = s.Trim(",")
t.Filter = "[_Identify] in (" & s & ")"
For Each r As Row In t.Rows
    If lst.Contains(r("_Identify")) Then
        r.Checked  = True
    End If
Next
End If



 回到顶部
帅哥哟,离线,有人找我吗?
yangwenghd
  23楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2701 积分:17993 威望:0 精华:0 注册:2013/4/9 10:41:00
  发帖心情 Post By:2020/6/12 17:40:00 [只看该作者]

谢谢老师,可以了 感谢 感谢 

 回到顶部
总数 23 上一页 1 2 3