The answers you've been given and that you seem to be accepting loop through a DAO recordset. That is generally a very inefficient method of accomplishing a text. For instance, this:
Set db = CurrentDB()
Set rs = db.OpenRecordset("[sql]")
If rs.RecordCount > 0
rs.MoveFirst
Do While Not rs.EOF
rs.Edit
rs!Field = "New Data"
rs.Update
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Set db = Nothing
will be much less efficient than:
UPDATE MyTable SET Field = "New Data"
which can be run with:
CurrentDb.Execute "UPDATE MyTable SET Field = 'New Data'"
It is very seldom the case that one needs to loop through a recordset, and in most cases a SQL update is going to be orders of magnitude faster (as well as causing much shorter read/write locks to be held on the data pages).
--
David W. Fenton
David Fenton Associates