本来不打算发上来的,可是那天看到黄海的那个例子,居然我们是都是在6号用的,所以也发来让大家看看。这个代码是基于罗斯文数据库的代码的基础上改进的。 Public Function PY(Tstr As String) As String A = Len(Tstr) 'I = Asc(Tstr)
If I >= Asc("芭") And I < Asc("擦") Then PinYin = "B" If I >= Asc("擦") And I < Asc("搭") Then PinYin = "C" If I >= Asc("搭") And I < Asc("蛾") Then PinYin = "D" If I >= Asc("蛾") And I < Asc("发") Then PinYin = "E" If I >= Asc("发") And I < Asc("噶") Then PinYin = "F" If I >= Asc("噶") And I < Asc("哈") Then PinYin = "G" If I >= Asc("哈") And I < Asc("击") Then PinYin = "H" If I >= Asc("击") And I < Asc("喀") Then PinYin = "J" If I >= Asc("喀") And I < Asc("垃") Then PinYin = "K" If I >= Asc("垃") And I < Asc("妈") Then PinYin = "L" If I >= Asc("妈") And I < Asc("拿") Then PinYin = "M" If I >= Asc("拿") And I < Asc("哦") Then PinYin = "N" If I >= Asc("哦") And I < Asc("啪") Then PinYin = "O" If I >= Asc("啪") And I < Asc("欺") Then PinYin = "P" If I >= Asc("欺") And I < Asc("然") Then PinYin = "Q" If I >= Asc("然") And I < Asc("撒") Then PinYin = "R" If I >= Asc("撒") And I < Asc("塌") Then PinYin = "S" If I >= Asc("塌") And I < Asc("挖") Then PinYin = "T" If I >= Asc("挖") And I < Asc("昔") Then PinYin = "W" If I >= Asc("昔") And I < Asc("压") Then PinYin = "X" If I >= Asc("压") And I < Asc("匝") Then PinYin = "Y" If I >= Asc("匝") And I <= Asc("座") Then PinYin = "Z" D = D & PinYin |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 18:38 , Processed in 0.069335 second(s), 17 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.