Link to home
Create AccountLog in
Avatar of avoorheis

asked on

Access transfertext macro missing headers

The macro does transfer the query data to a text file as desired (I am using a specification), but, I can't get the header from the query to show up in the text file. Is there a special trick?

Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of avoorheis


Yes, I've tried HasFieldNames both ways, no luck. If I don't use a spec (just the default delimited format) the field names do appear (quoted and coma separated, which is what I don't want).

The original query is a pass through, which was giving me problems trying to export, so, made a standard query using the passthrough as the source. Exports ok, except missing the headers.

Nothing unusual about the header, no spaces, comas or even underscores. I'll try a really simple query or table just to make sure it works at all.
just tested with simple table using a spec and no headers. I noticed in the spec there isn't anything about headers, but, I did set the macro's transfertext parameter, Has Field Names, to yes.
I'm using access 2007.
I'm stuck now. Could have sworn I've done this before.
well, i got it to work in vba.
I created an export specification and used that, but, the export specification will not show up (or work if I type it in) in the macro.
Maybe it's not possible in a macro?
That's quite possible, considering you're building a the output based on a query, which is itself based on a query that is a passthrough.