Captions vs Column Names in Exports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The doc shows that an export to a tab-delimited text file will optionally
show field names (it does) and that those names will be taken from the column
names defined by the query (and underlying table(s)). Also true.

My problem is that I need to generate an export with very specific column
names so that it can be imported by another program.

I defined those specific column names in the Caption property of each column
in the query, and sure enough they show up correctly in Datasheet Mode when I
run the query. And when I run the export, I get the original column names,
not the Caption column names.

Surely many Access users must have this requirement... what is another way
to do it?

Thanks in advance,
David.
 
Surely many Access users must have this requirement... what is another way
to do it?

You can use alias names in defining the query; e.g. if your table
field is named LastName and you want it exported as Customer Surname,
put

Customer Surname: [LastName]

in the Field cell in the query grid. Or, in SQL view, use

SELECT [LastName] AS [Customer Surname], ...


John W. Vinson[MVP]
 
Nice.
Works perfectly.
Of course I should have thought about the SQL equivalent...
Thanks
David.

John Vinson said:
Surely many Access users must have this requirement... what is another way
to do it?

You can use alias names in defining the query; e.g. if your table
field is named LastName and you want it exported as Customer Surname,
put

Customer Surname: [LastName]

in the Field cell in the query grid. Or, in SQL view, use

SELECT [LastName] AS [Customer Surname], ...


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top