DoCmd.TransferText acImportDelim Question

Toff

Registered User.
Local time
Today, 15:37
Joined
Aug 10, 2010
Messages
40
Hi there,

I an doing a TransferText that is working well.

The problem that arises sometimes is when the file I am grabbing has delimiter errors in it.

Access is still importing the file but it is not producing an error. I have error trapping in it but it is not coming up with anything. Instead Access is making a table that has a reference to the import error. Users do not see the tables of course and they may not notice an error in their data.

Anyone know of a way for me to detect this error so I can alert the user to check their import file?

Thanks
 
you could delete the errors table first - and then see if the import generated an errors table ....


but if the data is suspect, i would be inclined not to use transfertext at all.

open the file, and read it in a row at a time

then use split to determine how many delimiters there are, and if its the wrong number, inform the user, and reject the load.

more work, but if you can't rely on a csv, then it's the only way.
 
The data is rarely suspect but an error does happen once a month or so and thankfully it is only the specific line that gets messed up not the entire csv.

Your thoughts are what I figured I would have to do but I was hoping there was something out there I didn't know about.

Thanks
 

Users who are viewing this thread

Back
Top Bottom