以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  请问:输入工号后如何自动输入姓名,工号和姓名在表基本信息。  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=25244)

--  作者:lyfxybc
--  发布时间:2012/11/4 20:07:00
--  请问:输入工号后如何自动输入姓名,工号和姓名在表基本信息。
请问:输入工号后如何自动输入姓名,工号和姓名在表“基本信息”中。
图片点击可在新窗口打开查看此主题相关图片如下:1226.jpg
图片点击可在新窗口打开查看

--  作者:czy
--  发布时间:2012/11/4 20:15:00
--  
If e.DataCol.name = "工号"
    If e.DataRow.IsNull("工号") = False
        Dim dr As DataRow = DataTables("基本信息").Find("工号 = \'" & e.DataRow("工号") & "\'")
        If dr IsNot Nothing Then
            e.DataRow("姓名") = dr("姓名")
        End If
    Else
        e.DataRow("姓名") = Nothing
    End If
End If

--  作者:lyfxybc
--  发布时间:2012/11/4 20:25:00
--  
谢谢,根据您给的代码已完成。
--  作者:有点蓝
--  发布时间:2017/10/17 22:59:00
--  
这是代码不是sql,代码要写到事件中:http://www.foxtable.com/webhelp/scr/1445.htm