This will read through a table (or query), scan each field (named code1 and code2 below) and omit characters specified by the line in the select case. You can use both quoted literals or ascii characters with chr$(xx).
It may be slow, but it works. You can also use the function without the subloop, just feed it a string and it will return the string cleaned.
Code:
Sub subloop()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("table1")
rst.MoveLast
rst.MoveFirst
With rst
While Not .EOF
.Edit
!code1 = fcnClean(!code1)
!code2 = fcnClean(!code2)
.Update
.MoveNext
Wend
End With
set rst = nothing
End Sub
Function fcnClean(arg As String) As String
Dim clean As String
Dim tst As String
Dim i As Integer
Dim x As Integer
i = Len(arg)
For x = 1 To i
tst = Mid(arg, x, 1)
Select Case tst
Case ",", Chr(46), "|", Chr$(34), Chr$(39), "&", "%", "#" 'and so on
Case Else
clean = clean & tst
End Select
Next x
fcnClean = clean
'Debug.Print clean
End Function