Solved

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

Posted on 2013-02-01
3
289 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 47

Expert Comment

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

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

726 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