B
Bryan Spiers
I have a challenge. Maybe someone can relate and give me some much needed
guidence. I like to use access to handle text files containing data. Almost
all of the time I am dealing with many csv files in a folder and bring them
in to a single table (("MainCpp") and then start the analysis from this data.
____________________________________________
With Application.FileSearch
.LookIn = myFolder
.FileName = "*.csv"
.Execute
If .foundfiles.Count > 0 Then
For fileLoop = 1 To .foundfiles.Count
DoCmd.TransferText acImportDelim, "CPPImportSpec", "MainCPP",
..foundfiles(fileLoop)
Next fileLoop
End If
_____________________________________________________
This handles the many csv files in a folder and imports them to the MainCPP
table. Here is my quesion/challenge. ....I would love to modify this to
allow a user to manage some of the files that do not need to be imported with
out having the user open an explorer window>sequence the files> delete the
oldest ones not needed.
I picture a form that opens up with a list of all the files (sequenced by
date - I get one each day and I normally want to work on the latest 20 or so
files) On the form could vba tell the form to list the files and with a radio
button allow me to select some of the files for deletion prior to importing
the files using the above code>>??
guidence. I like to use access to handle text files containing data. Almost
all of the time I am dealing with many csv files in a folder and bring them
in to a single table (("MainCpp") and then start the analysis from this data.
____________________________________________
With Application.FileSearch
.LookIn = myFolder
.FileName = "*.csv"
.Execute
If .foundfiles.Count > 0 Then
For fileLoop = 1 To .foundfiles.Count
DoCmd.TransferText acImportDelim, "CPPImportSpec", "MainCPP",
..foundfiles(fileLoop)
Next fileLoop
End If
_____________________________________________________
This handles the many csv files in a folder and imports them to the MainCPP
table. Here is my quesion/challenge. ....I would love to modify this to
allow a user to manage some of the files that do not need to be imported with
out having the user open an explorer window>sequence the files> delete the
oldest ones not needed.
I picture a form that opens up with a list of all the files (sequenced by
date - I get one each day and I normally want to work on the latest 20 or so
files) On the form could vba tell the form to list the files and with a radio
button allow me to select some of the files for deletion prior to importing
the files using the above code>>??