Transfer Text not working

dheich4321

Registered User.
Local time
Today, 12:33
Joined
Apr 21, 2003
Messages
36
I have a transfer text module that does the following
Function AddressTable()
DoCmd.OpenQuery "Delete AddressSkip Table", acViewNormal, acEdit

DoCmd.TransferText acImportDelim, "AddressSkip Import Specification", "AddressSkip", "C:\pmclabel\addressskip.txt", True, ""

End Function

It deletes the data in the table then imports the records.
If I do the process manually. File->Import Data> Advanced- use the AddressSkip Import Specification. into an existing table. It imports the data correctly.

When I use the module, it imports the 1st field and nothing more.

Any suggestions?
 
why are you opening the query first? Either run it after the import or not at alll, this is just a waste.

Are you sure you have a delimited file? Or is it a fixed file?
Mixing a Delimited parameter (acImportDelim) with a seperated file, will give results like this. (or vice versa ofcourse)

While I am here, DONT use any spaces in any names anywhere any time....
Naming convention! Get a naming convention going where i.e. all queries are prefixed with qry and tables by tbl.
 
It was delimited vs fixed. Thanks for the knowledge. The reason I am running the delete query is to clear the table, prior to loading the new detail.

Thanks again
 
Ah, yes, delete query... *DUH*

Delimited vs Seperated, I still run into that error myself sometimes... Typical *slap yourself on the head*-error
 

Users who are viewing this thread

Back
Top Bottom