I am trying to remove all enters from a text string and replace them with a comma and a space in Access 97 which means that I can't use the Replace function as that doesn't exist in this version. I am using the following code:
For x = 1 To Len(string)
y = Mid(string, x, 1)
If y = Chr(13) Then
y = ", "
End If
NewString = NewString + y
Next x
string = NewString
The problem is that this code completely fails to detect and remove the enter. What am I doing wrong, any ideas?
For x = 1 To Len(string)
y = Mid(string, x, 1)
If y = Chr(13) Then
y = ", "
End If
NewString = NewString + y
Next x
string = NewString
The problem is that this code completely fails to detect and remove the enter. What am I doing wrong, any ideas?