Exporting-Column Names

  • Thread starter Thread starter Regi
  • Start date Start date
R

Regi

Hi,

I have a report based on an Query in Access I need to export to Excel. What
I've tried is creating a table from the query. What I would like to do is
when the table gets to Excel have the columns named the same way the report
is. I tried this as a caption in both the table and it's query. I didnt work
any sugestions?

Thanks, Regi
 
You don't need a table. You can do it with a query. Just assign an alias to
the colums with the name you want as the column header in Excel.
In your query designer, the field name shows in the Field row. Say for
example you have field named WingBat, but you want it to say SoapDish in
Excel, put the name you want in front of the field name followed by a colon.
For example

WingBat

Change it to

SoapDish: WingBat

Now, if there is more than one table or query in the query that have a field
named WingBat, you will have to include the reference to the table or query
you want to use.

SoapDish: SomeTable!WingBat
 
Thank you very much I'll give it a try!

Klatuu said:
You don't need a table. You can do it with a query. Just assign an alias to
the colums with the name you want as the column header in Excel.
In your query designer, the field name shows in the Field row. Say for
example you have field named WingBat, but you want it to say SoapDish in
Excel, put the name you want in front of the field name followed by a colon.
For example

WingBat

Change it to

SoapDish: WingBat

Now, if there is more than one table or query in the query that have a field
named WingBat, you will have to include the reference to the table or query
you want to use.

SoapDish: SomeTable!WingBat
 
Back
Top