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

Problems with TransferText

P: n/a
Hi

Wondering if anyone can help me with a problem this.

I am trying to import a fixed-width text file into Access using code
(run through Excel) using the following code

appaccess.DoCmd.TransferText acImportFixed, "ImportSpec", "New Data
Load Test", ImportFileName, False

(ImportFileName is already defined as a string for the path and file to
be imported)

However, when this imports it recognises the Import Specification to
set up the columns in the new table, but doesn't separate out the data
as per the specification. Instead it all goes into the first column
(This then leads to a whole load of import errors as it gets truncated)

I have tried the code running in an Access procedure and there are no
problems (Code as above except without the appaccess line) but this has
to be run as code through excel.

Am i missing something obvious?

Many thanks

Andrew

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.