replace characters based on specified position number

To clarify: why is it that if I use the code with the DUMMY replacement, Access goes through ALL the rows? Access replaces all the DUMMY texts in ALL the rows.

If I use the code with left, mid, right functions (it is essentially the same replacement function code but with the additional left, mid, right functions), Access just changes the last row.
 
To clarify: why is it that if I use the code with the DUMMY replacement, Access goes through ALL the rows? Access replaces all the DUMMY texts in ALL the rows.

If I use the code with left, mid, right functions (it is essentially the same replacement function code but with the additional left, mid, right functions), Access just changes the last row.

The csv file is just one long text string.
When opened in Excel or Access, these read it using line feeds to show separate rows

The Replace function just looks for all instances of DUMMY and replaces them.
The Left, Mid and Right functions find specific positions in the string to allow you to read or modify that part of the string.

In this example there seems to be no benefit in using anything other than REPLACE
 
^Good explanation (specially: "The csv file is just one long text string. ")

Is it still possible for me to go through each row in the text file to run the Replace function with left and mid functions?
 
anski,
This is my interpretation of the thread based on all comments. Is it correct?
You want to deal with the csv file and vba without ever importing the csv data into an Access table
 
^Good explanation (specially: "The csv file is just one long text string. ")

Is it still possible for me to go through each row in the text file to run the Replace function with left and mid functions?

Probably not without importing or linking it in a table in Access as jdraw just implied. Why bother when the replace function works perfectly
 

Users who are viewing this thread

Back
Top Bottom