By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

DoCmd.TransferText VBA versus Wizard

P: 332
I am having issues importing a space delimited file with DoCmd.TransferText.
I created a specification name through File->Get External Data->Import.
It all works fine when I import the file via the MS Access Import wizard and use the import specification name but when I replicate the same process through
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acImportDelim, "202DailyListImportSpecification", "tmp_202", cleanfile, False
that does not cooperate at all. The first 11 fields from the text file are imported in the first field of the table.
In either case, I do the import in a newly created table.
Mar 13 '12 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 2.5K+
P: 3,284

Have you found a solution to this yet? If you could post a sample of your text, that might help...

Jul 26 '12 #2

P: 332
Hi twinnyfo
It has been so long, I had to go back to the code to see how I solved it.
Each line of text was right padded with about 250 blank spaces. After I trimmed the lines, it worked ok. It's odd.

Thanks anyway.
Jul 27 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.