以文本方式查看主题

-  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=151846)

--  作者:nxqtxwz
--  发布时间:2020/7/5 21:43:00
--  转换内容

同一表中的两列:

如果A列的内容是abc,则列B写入1

如果A列的内容是efg,则列B写入2

最简单的代码怎么写呢?


--  作者:有点蓝
--  发布时间:2020/7/5 21:46:00
--  
参考:http://www.foxtable.com/webhelp/topics/0625.htm

If e.DataCol.Name = "A列" Then 
    If e.DataRow("A列")=“abc” Then 
        e.DataRow("列B") = 1
    
Else
If e.DataRow("A列")=“efg” Then 
    
    \'否则从身份证号码列中提取出生日期
        e.
DataRow("
列B") = 2
    End
 If
End If