StuartBowen
New member
- Local time
- Today, 03:39
- Joined
- Jul 12, 2017
- Messages
- 11
OK. Banging my had for hours now.
I am doing something exceptionally simple yet it fails.
I am importing some data in various CSV files in a loop into Access, and all CSV files have the same format.
I need to check a file exists for a client (filename is in format domainname.co.uk-Users.csv
Because Access doesn't like importing a file with extra .'s I rename if it exists to M365Temp.csv
I then import to M365Temp, run a query to append to a main table, delete the M365Temp.csv file and loop though to the next client.
DoCmd.TransferText acImportDelim, "M365Temp", "M365Temp", "C:\CIPPExports\" & "M365Temp.csv", True
Some clients run through fine yet others I hit the 'The text file specification <name> does not exist. You cannot import, export, or link using the specification. (Error 3625)' error. However, it does because it worked 2 minutes ago importing the same file with the same name using the same specification. I also see it in MSysIMEXSpecs.
Also, thinking it may be the file structure content, if I just take the line that imports, pop that on a button and run, it is fine.
Any ideas how to troubleshoot this one?
BTW the CSV files are on sharepoint, but I have a 30 sec pause now just in case it is synching and locking. It is definitely synched and fine before it tries to import.
I am doing something exceptionally simple yet it fails.
I am importing some data in various CSV files in a loop into Access, and all CSV files have the same format.
I need to check a file exists for a client (filename is in format domainname.co.uk-Users.csv
Because Access doesn't like importing a file with extra .'s I rename if it exists to M365Temp.csv
I then import to M365Temp, run a query to append to a main table, delete the M365Temp.csv file and loop though to the next client.
DoCmd.TransferText acImportDelim, "M365Temp", "M365Temp", "C:\CIPPExports\" & "M365Temp.csv", True
Some clients run through fine yet others I hit the 'The text file specification <name> does not exist. You cannot import, export, or link using the specification. (Error 3625)' error. However, it does because it worked 2 minutes ago importing the same file with the same name using the same specification. I also see it in MSysIMEXSpecs.
Also, thinking it may be the file structure content, if I just take the line that imports, pop that on a button and run, it is fine.
Any ideas how to troubleshoot this one?
BTW the CSV files are on sharepoint, but I have a 30 sec pause now just in case it is synching and locking. It is definitely synched and fine before it tries to import.