Hi all,

I have spend quite some time on figuring out how to remove the , (comma) from a field in a table. I have come up with the following code.

------------------------------------------
Dim rst As ADODB.Recordset
Dim strCnn As ADODB.Connection
Dim antwoord As String
Dim str As String

Set strCnn = New ADODB.Connection
Set rst = New ADODB.Recordset


strCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & "G:\NAWKLANT\Fontys\Fontys.mdb" & ";Persist Security Info=False"
strCnn.Open

rst.CursorLocation = adUseClient
rst.CursorType = adOpenStatic
rst.LockType = adLockBatchOptimistic
rst.Open "SELECT * FROM TempCur WHERE Naam Like '*,*' ORDER BY Naam;"
strFind = "'*,*'"
strReplace = "'""'"

strCnn.Close
Set strCnn = Nothing
Set rst = Nothing

----------------------------------------------------------------------

I have to admit I do not fully understand this piece of code. I have build it myself (that is why it isn't working) from pieces of code I already had and combined it with a little help and source from internet.

Could someone point out what I am doing wrong?

Thanks in advance!

Jasper