We help IT Professionals succeed at work.

transfertext  - If using an import spec, is a header record required, it seems so.....

mytfein
mytfein asked
on
Hi EE,

transfertext  - If using an import spec, is a header record required, it seems so.....

pls advise, tx, sandra
Comment
Watch Question

Chief information Officer
Commented:
i think there is an option box to tick when creating the spec to say wether a header record is required.

if you create a spec, you are defining what the column names will be in the spec.  what makes you say "it seems so?"

Author

Commented:
hi sudonim,

tx so much for writing...

i will go check if there is an option box for a header....

i created an import specification and experimented:
   - import with header - got all following data records
   - import w/o  header - first record did not get imported, so guessed that access
                                       considered the first record a header record

this file is provided by a vendor w/o a header, so let me see if i can find the tick box that you mention...

will be back, tx, s

Author

Commented:
Hi Sudonim,

ok, you inspired me...

the specs window does not have a box to skip the header
    if manually doing an import, it does ask if you have a header

but as i want to do this thru vba,
    went back to code, which i copied off the internet, and there is a TRUE/FALSE parameter
     for field names:

so i set to False:

DoCmd.TransferText acImportDelim, _
      "match_results_136 Import Specification", _
      pg_strTableName_ThisYear_NRMP, _
      Me.txtFolderPathText, _
      False


http://msdn.microsoft.com/en-us/library/aa220768(v=office.11).aspx

will go test it, tx, s

Author

Commented:
Hi Sudonim,

yes... FALSE is what it needed....

tx again, s

Author

Commented:
Dear EE public,

Sudonim's questions and help, jogged my brain to understand where the solution may be...
so pls read lower to what i posted to the technical solution....

tx, s
Simon BallChief information Officer

Commented:
nicely done.

I don't really deserve the point, but you've put me 2% closer to sage, so many thanks :)
Simon BallChief information Officer

Commented:
also,

If you'd mentioned you were using VBA in the original question, i'd have looked into that bit too :)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.