[AccessD] Replace Special Characters

Drew Wutka DWUTKA at marlow.com
Thu Apr 10 15:07:38 CDT 2003


Function ReturnJustAlphaNumeric(strOriginal as String) as string
Dim strTemp as string
Dim i as long
strTemp=""
For i=1 to Len(strOriginal)
	if IsNumeric(mid(strOriginal,i,1)) Or _
	(Asc(mid(UCase(strOriginal),i,1))>=65 And _
	Asc(mid(UCase(strOriginal),i,1))<=90) Then
		strTemp=strTemp & mid(strOriginal,i,1)
	End If
Next i
ReturnJustAlphaNumeric=strTemp
End Function

There ya go....

(Test it, I'm running on very little sleep, so I may have a typo in there.)

Drew

-----Original Message-----
From: Terri Jarus [mailto:jarus at amerinet-gpo.com]
Sent: Thursday, April 10, 2003 2:39 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Replace Special Characters


I want to be able to go through a column of data and strip out any
special characters (,./"'-*&!, etc.) and store the "clean" data to a new
column.

"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"

How would I go about doing this?

Thanks for any help.


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list