Thank You,
Just one question. How/where would I go about setting
this procedure up. And if I remove the Kill line, will
the files just remain where they are?
-----Original Message-----
Hi Mike,
This procedure - originally posted by Joe Fallon MVP - should get you
started:
How to Import all Files in a Folder:
Private Sub btnImportAllFiles_Click()
'procedure to import all files in a directory and delete them.
'assumes they are all the correct format for an ASCII delimited import.
Dim strfile As String
ChDir ("c:\MyFiles")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferText
acImportDelim, "ImportSpecName", "AccessTableName",
"c:\MyFiles\" & strfile, True
'delete the file (consider moving it to an Archive folder instead.)
Kill "c:\MyFiles\" & strfile
strfile = Dir
Loop
End Sub
I need to import approximately 230 text files into
access. Is there any way to import all 230 at one time.
For instance, is there a way to import a whole folder or
something like that.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.