Not sure if this helps but, this function will search a string for a substring and allow you to replace it with another string. You can run a loop that checks each value in your "bad word" table and run it against the string.
[tt]
Function fstrTran(ByVal sInString As String, _
sFindString As String, _
sReplaceString As String) As String
Dim iSpot As Integer, iCtr As Integer
Dim iCount As Integer
iCount = Len(sInString)
For iCtr = 1 To iCount
iSpot = InStr(1, sInString, sFindString)
If iSpot > 0 Then
sInString = Left(sInString, iSpot - 1) & _
sReplaceString & _
Mid(sInString, iSpot + Len(sFindString))
Else
Exit For
End If
Next
fstrTran = sInString
End Function
[/tt]
Sample Usage
Result = fstrTran(MyString,"BadWord", "B******"
HTH Joe Miller
joe.miller@flotech.net