Solved

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

Posted on 2013-02-01
3
259 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)
Comment Utility
ASC()
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
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
Comment Utility
Thanks again, Cap
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now