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

TransferText and Missing/Skipped first line - Solution

P: n/a
I am posting this as I have not been able to find a direct posting with
a specific solution, just work arounds (usually the need to create
custom import routines.) I found the solution!

I am using Access 2003.

The problem:
When using the TransferText command in code, the first record in
the text file is skipped, even with the HasFieldNames set to False.

Example command:
DoCmd.TransferText acImportDelim, str_SpecName, str_TblName,
str_FileName, False

When the import/export spec is created in the wizard, the "First
Row Contains Field Names" box MUST be unchecked BEFORE the spec is
saved. this will set the proper flag in the system table.
- Table: MSysIMEXSpecs
- Field: StartRow

The StartRow appears to override the TransferText HasFieldNames

I would appreciate if this could be verified with other versions.
Please correct any errors.

- Daron S. Lowell

Dec 8 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.