?
Solved

How to identify non-displaying characters in a text string?

Posted on 2013-02-01
3
Medium Priority
?
302 Views
Last Modified: 2013-02-03
Hello - trying to import some crap data, and I'm getting text values that have trailing non-display characters that Trim() won't... Trim...

is there a function that does the reverse of Chr(), so I can parse through and see what exactly these trailing characters are?

Thanks
0
Comment
Question by:mlagrange
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38843987
ASC()
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38844177
try this function

Function AlphaNumOnly(strIn As String) As String

Dim j As Integer
Dim varStr As String
varStr = strIn
While j < Len(varStr)
   j = j + 1
   Select Case Asc(Mid(varStr, j, 1))
            Case 32 To 126
            ' do nothing
   Case Else
      ' get rid of everything else:
      varStr = Left(varStr, j - 1)  &  Mid(varStr, j + 1)
      If j > 1 Then j = j - 1
   End Select
Wend
AlphaNumOnly = varStr
End Function
0
 

Author Closing Comment

by:mlagrange
ID: 38849553
Thanks again, Cap
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question