Hi, I hope someone can help, I am not very familiar with VB, but I believe what I am trying to do is simple, and I'm sure someone will know the answer. 
I am using Access 2000 with VB 6.5
I am trying to import text files, which have different filenames, into an existing Access Table. The structure of all files are the same and they are stored in the same directory.
My problem is, I have to specify the filename, and therefore can not import more than one file. My VB code is: -
_____________________________________
Function ProdImport()
On Error GoTo ProdImport_Err
DoCmd.TransferText acImportDelim, "Import Specification", "ProductionImp", "c:\daten\es7000\160209_1456.txt", False, ""
_______________________________________
What I want to do is change the filename (currently 160209_1456) to select ALL files in the directory c:\daten\es7000. Additionally, if I run the import more than once I get duplicate records, so ideally after I ahve done the import I want to either delete the files imported or move them to a new directory, as to avoid 'Operator Error'.
I hope a 'wizz' can help me!
Kind regards
Brett
I am using Access 2000 with VB 6.5
I am trying to import text files, which have different filenames, into an existing Access Table. The structure of all files are the same and they are stored in the same directory.
My problem is, I have to specify the filename, and therefore can not import more than one file. My VB code is: -
_____________________________________
Function ProdImport()
On Error GoTo ProdImport_Err
DoCmd.TransferText acImportDelim, "Import Specification", "ProductionImp", "c:\daten\es7000\160209_1456.txt", False, ""
_______________________________________
What I want to do is change the filename (currently 160209_1456) to select ALL files in the directory c:\daten\es7000. Additionally, if I run the import more than once I get duplicate records, so ideally after I ahve done the import I want to either delete the files imported or move them to a new directory, as to avoid 'Operator Error'.
I hope a 'wizz' can help me!
Kind regards
Brett