Solved

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

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

839 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