以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何制作检索按钮可同时检索多张表格?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=21450)

--  作者:初级狐鸟
--  发布时间:2012/7/12 16:34:00
--  如何制作检索按钮可同时检索多张表格?

检索单张的表格,其按钮带学习为

Dim txt As String = e.Form.Controls("TextBox11").Text
Dim tbl As Table = Tables("往来帐")
If txt = "" Then
    tbl.Filter = ""
Else
    txt = "\'*" & txt & "*\'"
    tbl.Filter = "商家编码 Like " & txt & " Or 商家名称 Like " & txt & " Or 操作员 Like " & txt & " Or 摘要 Like " & txt  & " Or 金额类别 Like " & txt    & " Or 关联工单 Like " & txt    & " Or 备注 Like " & txt     
End If

如何设置代码使其可以一次检索多张表格呢?

 

 

麻烦指导了哦~


--  作者:狐狸爸爸
--  发布时间:2012/7/12 17:12:00
--  

Dim txt As String = e.Form.Controls("TextBox11").Text
Dim tbl1 As Table = Tables("往来帐")
Dim tbl2 As Table = Tables("往来帐2")
If txt = "" Then
    tbl1.Filter = ""

    tbl2.Filter = ""
Else
    txt = "\'*" & txt & "*\'"
    tbl1.Filter = "商家编码 Like " & txt & " Or 商家名称 Like " & txt & " Or 操作员 Like " & txt & " Or 摘要 Like " & txt  & " Or 金额类别 Like " & txt    & " Or 关联工单 Like " & txt    & " Or 备注 Like " & txt     
    tbl2.filter = tbl1.filter
End If


--  作者:初级狐鸟
--  发布时间:2012/7/12 17:28:00
--  
哦~~这么子的索,谢谢了哦!