R
RJF
I’ve been trying to figure this out for over a week and now I am desperate
for help! I don’t know VB very well.
I am importing a .csv file into Access. I have that working fine except
when there are carriage returns within the body of the text. Before I import
the file, I need Access to do a find and replace within the text file to
eliminate the carriage returns. BUT, I need the carriage returns at the end
of each line in the file to stay there.
Here’s a sample of the text in the .csv file.
This:
"1315841","milli
meters","1â€,"1315841","Default"
"1316985","False","
200","False","Default"
Should be this:
"1315841","millimeters","1","1315841","Default"
"1316985","False","200","False",â€Default"
This is what I’ve got to start off with:
strfilter = ahtAddFilterItem(strfilter, _
"All Files (*.*)", _
"*.*")
strinputfilename = ahtCommonFileOpenSave( _
Filter:=strfilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Open strinputfilename For Random As #1
I know the part to select the file works because I use that to import the
file into Access. I got the Open statement from this forum but got really
confused after that.
Any help would be so greatly appreciated.
Thanks,
for help! I don’t know VB very well.
I am importing a .csv file into Access. I have that working fine except
when there are carriage returns within the body of the text. Before I import
the file, I need Access to do a find and replace within the text file to
eliminate the carriage returns. BUT, I need the carriage returns at the end
of each line in the file to stay there.
Here’s a sample of the text in the .csv file.
This:
"1315841","milli
meters","1â€,"1315841","Default"
"1316985","False","
200","False","Default"
Should be this:
"1315841","millimeters","1","1315841","Default"
"1316985","False","200","False",â€Default"
This is what I’ve got to start off with:
strfilter = ahtAddFilterItem(strfilter, _
"All Files (*.*)", _
"*.*")
strinputfilename = ahtCommonFileOpenSave( _
Filter:=strfilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Open strinputfilename For Random As #1
I know the part to select the file works because I use that to import the
file into Access. I got the Open statement from this forum but got really
confused after that.
Any help would be so greatly appreciated.
Thanks,