Replace Function

  • Thread starter Thread starter Terence
  • Start date Start date
T

Terence

I am trying to export a file in a csv format. I need to
find away to replace "" in employees names (ex. "chuck").

If I export the file with the "" and try to import the
file again, the "" messes up the layout of the file.

Any help is appreciated.
 
I am trying to export a file in a csv format. I need to
find away to replace "" in employees names (ex. "chuck").

If I export the file with the "" and try to import the
file again, the "" messes up the layout of the file.

Any help is appreciated.

Try

Replace([namefield], """", "'")

to change "Chuck" to 'Chuck'

Note that the Replace() function may not be available in queries in
Access2000 and earlier versions; you might need to write a dumb little
wrapper function:

Public Function QReplace(strIn As String, strOld As String, strNew As
String) As String
QReplace = Replace(strIn, strOld, strNew)
End Function
 
John,

Thanks. The replace function worked perfectly.
-----Original Message-----
I am trying to export a file in a csv format. I need to
find away to replace "" in employees names (ex. "chuck").

If I export the file with the "" and try to import the
file again, the "" messes up the layout of the file.

Any help is appreciated.

Try

Replace([namefield], """", "'")

to change "Chuck" to 'Chuck'

Note that the Replace() function may not be available in queries in
Access2000 and earlier versions; you might need to write a dumb little
wrapper function:

Public Function QReplace(strIn As String, strOld As String, strNew As
String) As String
QReplace = Replace(strIn, strOld, strNew)
End Function


.
 
Back
Top