acImportDelim issues - Access 2003

JH40

Registered User.
Local time
Today, 02:42
Joined
Sep 16, 2010
Messages
100
I was hoping someone may be able to edit my import VBA below. I receive a text file daily with no headers, but the headers have been built into a spec that I manually apply when importing to a table in Access 2003. I'm trying to create a command for importing the file, but it imports incorrectly--fields don't line up with the headers right. I am a novice at VBA so I hope someone will find humor in this and help a newbie out. :)

DoCmd.SetWarnings False

DoCmd.TransferText acImportDelim, "HSPIPA Import Specification", "HSPIPA", "T:\Care Operations\Analytics\Hospital DATA Acquisition\HospHealth\Daily Data\HSPIPA.txt", no

DoCmd.SetWarnings True
 
either you have a comma separated file, or a ascii text file, with set positions for the various fields.

the spec file needs to agree precisely with the file - i suspect it doesn't, in your case.
 

Users who are viewing this thread

Back
Top Bottom