以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  引用最后日期  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=93096)

--  作者:yaojun
--  发布时间:2016/11/20 16:29:00
--  引用最后日期

If e.DataCol.Name = "识别号" Then
    Dim nms() As String = {"供货单位","入库时间"}
    If e.NewValue Is Nothing Then
        For Each nm As String In nms
            e.DataRow(nm) = Nothing
        Next
    Else
        Dim dr As DataRow
        dr = DataTables("入库明细").Find("[识别号] = \'" & e.NewValue & "\'")
        If dr IsNot Nothing
            For Each nm As String In nms
                e.DataRow(nm) = dr(nm)
            Next
        End If
    End If
End If

以上代码如何让“物料计划”表里面的入库时间自动提取“入库明细”表里面的最后一次入库时间,求代码。谢谢!


--  作者:y2287958
--  发布时间:2016/11/20 16:54:00
--  
find有一个排序参数的
--  作者:有点青
--  发布时间:2016/11/20 17:47:00
--  
dr = DataTables("入库明细").Find("[识别号] = \'" & e.NewValue & "\'", "入库时间 desc, _Identify desc")