B
Bob
The below code imports data from text files into a
database. Unfortunately, the loop does not end and just
keeps importing the data over and over and over again.
Does anyone have any suggestions?
Private Sub Command11_Click()
Dim myfile
Dim mypath
mypath = "C:\Documents and Settings\u26g\My
Documents\reusability\"
Do
myfile = Dir(mypath & "*.txt")
'this will import ALL the text files (one at a time, but
automatically) in this folder.
DoCmd.TransferText
acImportDelim, "Tab_Spec", "Resuability_test", mypath &
myfile
myfile = Dir
Loop Until myfile = ""
End Sub
database. Unfortunately, the loop does not end and just
keeps importing the data over and over and over again.
Does anyone have any suggestions?
Private Sub Command11_Click()
Dim myfile
Dim mypath
mypath = "C:\Documents and Settings\u26g\My
Documents\reusability\"
Do
myfile = Dir(mypath & "*.txt")
'this will import ALL the text files (one at a time, but
automatically) in this folder.
DoCmd.TransferText
acImportDelim, "Tab_Spec", "Resuability_test", mypath &
myfile
myfile = Dir
Loop Until myfile = ""
End Sub