我有一个表,其中一个字段有13个前导空格(其中没有可见字符)。我尝试了TRIM()
和REPLACE([Field1], " ", "")
,但都没有人工作过。任何人都可以冒险猜测发生了什么以及如何解决这个问题?
答案 0 :(得分:0)
这不是答案,但它可以让您查看字符串的chr值。只需将其称为MsgBox WhatAreTheAscValues([Field1]),您将看到组成字符串的字符的值,并允许您相应地调整代码。
Function WhatAreTheAscValues(str As String)
Dim i As Integer
Dim answer As String
answer = "The Chr(x) values in this string are listed below" & vbCrLf
For i = 1 To Len(str)
answer = answer + CStr(Asc(Mid(str, i, 1))) & ", "
Next i
WhatAreTheAscValues = Left(answer, Len(answer) - 2)
End Function