G
Guest
Hi, I found some code for importing multiple text files and am trying to
modify it to deal with Access DB files instead. Can anyone help please? I
have approx 150 DBs I want to import 4 Tables from each and append to four
tables in one master database.
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:\myAudits")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferDatabase acImport, 8, "c:\myaudits\" & strfile, True
'delete the file
Kill "c:\myaudits" & strfile
strfile = Dir
Loop
End Sub
modify it to deal with Access DB files instead. Can anyone help please? I
have approx 150 DBs I want to import 4 Tables from each and append to four
tables in one master database.
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:\myAudits")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferDatabase acImport, 8, "c:\myaudits\" & strfile, True
'delete the file
Kill "c:\myaudits" & strfile
strfile = Dir
Loop
End Sub