|
本帖最后由 方漠 于 2010-7-20 11:53 编辑
可以写个自定义函数,把要去掉的特殊符号列举在清单上面就行了. 如下(全角符号不可辨认了,你自己列一下就行.):
Function RemoveSymbol(StrK As String) As String
'~!@#$%^&*()_-+=<>,.?/;:'"\|¡££¬£¡¡¤#£¤%¡¡¡ª*£¨£©£¡ª£½+¡¶¡·£¬¡££»£º¡®¡°¡±¡¯¡¢|
'¡º¡»
StrK = Replace(StrK, "¡º", "")
StrK = Replace(StrK, "-", "")
StrK = Replace(StrK, "¡»", "")
StrK = Replace(StrK, "£º", "")
StrK = Replace(StrK, "¡°", "")
StrK = Replace(StrK, "¡±", "")
StrK = Replace(StrK, "*", "")
StrK = Replace(StrK, "¡¶", "")
StrK = Replace(StrK, "¡·", "")
StrK = Replace(StrK, "£¨", "")
StrK = Replace(StrK, "£©", "")
'.............. list all the symbol here with Replace Function
RemoveSymbol = StrK
End Function
此代码也可以在ACCESS VBA中直接使用.在QUERY里可以直接调用此函数.
|
|