J
jenni
Hello -
My code is below -
I found this is a previous post instructing how to upload
multiple files found in a designated folder all at once.
I attached this the the button and when I try to run it,
I get a "Syntax Error" message.
Any ideas where I went wrong???
Thank you!
........................................................
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:\Documents and Settings\jpfeifer.CCI\My
Documents\Mech\PR project\New472Format")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferText([acImportDelim],[specs_Import472],
[tbl_472_Import],[(C:\Documents and
Settings\jpfeifer.CCI\My Documents\Mech\PR
project\New472Format) & strfile], [False]
'delete the file (consider moving it to an Archive
folder instead.)
Kill "C:\Documents and Settings\jpfeifer.CCI\My
Documents\Mech\PR project\New472Format" & strfile
strfile = Dir
Loop
End Sub
My code is below -
I found this is a previous post instructing how to upload
multiple files found in a designated folder all at once.
I attached this the the button and when I try to run it,
I get a "Syntax Error" message.
Any ideas where I went wrong???
Thank you!
........................................................
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:\Documents and Settings\jpfeifer.CCI\My
Documents\Mech\PR project\New472Format")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferText([acImportDelim],[specs_Import472],
[tbl_472_Import],[(C:\Documents and
Settings\jpfeifer.CCI\My Documents\Mech\PR
project\New472Format) & strfile], [False]
'delete the file (consider moving it to an Archive
folder instead.)
Kill "C:\Documents and Settings\jpfeifer.CCI\My
Documents\Mech\PR project\New472Format" & strfile
strfile = Dir
Loop
End Sub