X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Clean Field Character Special, Access 2013    
post Aug 9 2017, 03:03 AM

Posts: 86
Joined: 12-February 15


It's possibile with routine clean up a string with special characters even those that you do not see....

Go to the top of the page
post Aug 9 2017, 03:21 AM

UtterAccess VIP
Posts: 5,451
Joined: 30-June 11

How about

Public Function StripSpChars(strString As String) As String
'Remove spaces and special characters from a string
'Source: Dave Hargis, Microsoft Access MVP (klatuu)
Dim lngCtr As Long
Dim intChar As Integer

    For lngCtr = 1 To Len(strString)
        intChar = Asc(Mid(strString, lngCtr, 1))
        If intChar >= 48 And intChar <= 57 Or _
            intChar >= 97 And intChar <= 122 Or _
            intChar >= 65 And intChar <= 90 Then
            StripSpChars = StripSpChars & Chr(intChar)
        End If
    Next lngCtr
End Function

If that isn't what you're after, please explain further and give us an example or two.

Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc

All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
post Aug 9 2017, 04:29 AM

Posts: 86
Joined: 12-February 15

It's that i find...

thank you
Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    15th December 2017 - 03:15 AM