D
DMUM via AccessMonster.com
Hello I have been using the following code to replace text in a table with
changes made by the User. It seemed to work fine until today when I tried to
change US to United States. It went through all the fields in the table and
replaced everything containing a US with United States. i.e Australia became
AUnited Statestralia. I looked at the MS Help and it seems I have all the
requirements in my query. I need it to find and replace WHOLE FIELD, not ANY
PART OF FIELD. The MS help didn't indicate anything in the code to specify
this unless I am missing something.
strSQL = "UPDATE tblImportExcel " & _
"SET tblImportExcel." & Me.txtColName & " = " & _
"Replace([" & Me.txtColName & "],""" & Me.txtFind & """, """ & Me.
txtEdit & """) "
Thanks
changes made by the User. It seemed to work fine until today when I tried to
change US to United States. It went through all the fields in the table and
replaced everything containing a US with United States. i.e Australia became
AUnited Statestralia. I looked at the MS Help and it seems I have all the
requirements in my query. I need it to find and replace WHOLE FIELD, not ANY
PART OF FIELD. The MS help didn't indicate anything in the code to specify
this unless I am missing something.
strSQL = "UPDATE tblImportExcel " & _
"SET tblImportExcel." & Me.txtColName & " = " & _
"Replace([" & Me.txtColName & "],""" & Me.txtFind & """, """ & Me.
txtEdit & """) "
Thanks