以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  关于到期提醒并加载相关数据到窗口中  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=123796)

--  作者:ZJZK2018
--  发布时间:2018/8/23 11:01:00
--  关于到期提醒并加载相关数据到窗口中
老师:
我有二个表“合同信息”和“收款明细”,二个表的以项目编号列作关联,需求是:通过收款明细表中已到期的项目,相同项目编号的合同信息的行加载进来。

Dim tb1 As Table = Tables("合同信息_Table1")
Dim dy As Date = Date.Today.AddDays(-30)
Dim filt As String = ""
For Each nd As String In DataTables("收款明细").GetValues("项目编号","收款提醒 < #" & dy & "#")
    filt = "项目编号 = \'" & nd & "\'"
    msgbox(nd)
Next
If filt > "" Then
    tb1.Filter = filt
End If

--  作者:有点蓝
--  发布时间:2018/8/23 11:19:00
--  
Dim tb1 As Table = Tables("合同信息_Table1")
Dim dy As Date = Date.Today.AddDays(-30)
Dim filt As String = ""
Dim v As String =  DataTables("收款明细").GetComboListString("项目编号","收款提醒 < #" & dy & "#")
    filt = "项目编号 in (\'" & v.Replace("|","\',\'") & "\')"
    msgbox(nd)

If filt > "" Then
    tb1.Filter = filt
End If