Foxtable(狐表)用户栏目专家坐堂 → 搜索明细表,列出对应关系


  共有1803人关注过本帖平板打印复制链接

主题:搜索明细表,列出对应关系

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


加好友 发短信
等级:四尾狐 帖子:858 积分:6381 威望:0 精华:0 注册:2017/2/13 9:04:00
搜索明细表,列出对应关系  发帖心情 Post By:2019/4/24 10:23:00 [只看该作者]

窗口表table1和table2,需求:查找出table2包含输入框文字的物供号,table1和table2保持到货单据号对应,怎么写?


图片点击可在新窗口打开查看此主题相关图片如下:qq图片20190424101632.png
图片点击可在新窗口打开查看

TextChanged

Dim txt As Integer = Forms("到货物检").Controls("TextBox1").Text
Dim tbl As Table = Tables("到货物检_Table2")
If txt = "" Then
    tbl.Filter = ""
Else
    txt = "'%" & txt & "%'"
    tbl.Filter = "物供号 Like " & txt
End If

CurrentChanged

If Forms("到货物检").Opened()
    Dim t As Table = Tables("到货物检_table2")
    Dim d As Table = Tables("到货物检_table1")    
        If d.Current Is Nothing Then
            t.Filter = "False"
        Else
            t.Filter = "到货单据号 = '" & d.Current("到货单据号") & "'                        
        End If
End If

 回到顶部