以文本方式查看主题

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

--  作者:6378929
--  发布时间:2017/7/12 11:15:00
--  [求助]提取文字的首字母代码
提取文字的首字母代码怎么写?  如  中华人民共和国   通过代码自动生成 zhrmghg
--  作者:有点甜
--  发布时间:2017/7/12 11:19:00
--  

DataColChanged事件写代码

 

If e.DataCol.Name = "中文" Then
    If e.NewValue > ""
        e.DataRow("拼音") = GetPinYin(e.NewValue, 1)
    Else
        e.DataRow("拼音") = Nothing
    End If
End If

 

http://www.foxtable.com/webhelp/scr/1270.htm

 


--  作者:6378929
--  发布时间:2017/7/12 11:37:00
--  
怎么变成只用拼音首字母   不显示全拼呢??
--  作者:有点甜
--  发布时间:2017/7/12 11:58:00
--  
2楼代码就是首字母。
--  作者:LuboV24
--  发布时间:2017/9/6 10:57:00
--  怎么换成大写字母呢
怎么换成大写字母呢
[此贴子已经被作者于2017/9/6 11:02:00编辑过]

--  作者:有点甜
--  发布时间:2017/9/6 11:10:00
--  
If e.DataCol.Name = "中文" Then
    If e.NewValue > ""
        e.DataRow("拼音") = GetPinYin(e.NewValue, 1).ToUpper
    Else
        e.DataRow("拼音") = Nothing
    End If
End If