Avatar of avoorheis
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?

thanks
alan
Microsoft Access

Avatar of undefined
Last Comment
Scott McDaniel (EE MVE )

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott McDaniel (EE MVE )

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
avoorheis

ASKER
thanks
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.
avoorheis

ASKER
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.
avoorheis

ASKER
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?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Scott McDaniel (EE MVE )

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.