blank records imported from .txt file

G

Guest

I've seen a few posts that seem related to the problem I'm having, but none
whose solutions are actually working for me.

I'm trying to import a comma delimited .txt file into an Access table. I
have import specifications already defined. My code is creating an empty
table to receive the data and then running docmd.transfertext. The resulting
table has the right number of records, but all the fields are blank. When I
use the import wizard, it works fine.

Here's the command I'm using.

DoCmd.TransferText acImportDelim, "CCR Block Import 0506", "Test",
"M:\CCR\Data\data0506\test.txt", False

Any thoughts? Thanks!
 
G

Guest

I somehow had it in my head that the input was delimited, but in fact it was
fixed length. Changing to acImportFixed solved the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top