All, I have code to import multiple text files into multiple tables in access 2003 There are about 15 tables It works but I have two problems. 1st I was converting the files from another source to text and placing them into a folder where I created import specification files. The problem is I need to automate the conversion part. How do I use VBA code to look at the file and add the extension .txt so that the program can find the file in the code. Here's part of my code. I didn't list all 15
In the textfiles folder, before the filename with .txt exist I have to add the .txt How do I add it automatically before the import?
2nd I need a cleanup routine to remove the additional lines in the text files like: list and sort which can appear randomily throughout the text files.
I hope I've explained this so you can help me
Thanks
Code:
'Import Text files into corresponding tables
DoCmd.TransferText acImportFixed, "PhoneNoProblems Import Specification", _
"PhoneNoProblems", "X:\DB_Working\0017_Errors\TextFiles\PhoneNoProblems.txt", True
DoCmd.TransferText acImportFixed, "StrangeZipcodes Import Specification", _
"StrangeZipcodes", "X:\DB_Working\0017_Errors\TextFiles\StrangeZipcodes.txt", True
In the textfiles folder, before the filename with .txt exist I have to add the .txt How do I add it automatically before the import?
2nd I need a cleanup routine to remove the additional lines in the text files like: list and sort which can appear randomily throughout the text files.
I hope I've explained this so you can help me
Thanks