以文本方式查看主题

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

--  作者:seal51
--  发布时间:2014/6/10 11:12:00
--  拼音
表A有两列,单位简称,拼音

如何写入单位简称, 单位简称的拼音自动生成
GetPY 如何使用, 代码放在什么地方呢

Dim jc as string

e.DataRow("拼音") = GetPY("jc")

不会写啊图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2014/6/10 11:14:00
--  

  写在Datacolchanged事件

 

If e.DataCol.Name = "单位名称" AndAlso e.NewValue <> Nothing Then

    e.DataRow("拼音") = GetPY(e.newvalue)

End If


--  作者:Bin
--  发布时间:2014/6/10 11:15:00
--  
DataColChanged事件

if e.datacol.name = "单位简称" then
   e.DataRow("拼音") = GetPY(e.datarow("单位简称"))
end if

--  作者:seal51
--  发布时间:2014/6/10 12:32:00
--  
谢谢老师