UtterAccess.com
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    
 
   
carlo
post Aug 9 2017, 03:03 AM
Post#1



Posts: 91
Joined: 12-February 15



Hi,

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


Thank
Go to the top of the page
 
DanielPineault
post Aug 9 2017, 03:21 AM
Post#2


UtterAccess VIP
Posts: 6,133
Joined: 30-June 11



How about

CODE
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.
Go to the top of the page
 
carlo
post Aug 9 2017, 04:29 AM
Post#3



Posts: 91
Joined: 12-February 15



It's that i find...

thank you
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    21st October 2018 - 06:04 PM