Exporting-Column Names

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
 
K

Klatuu

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
 
R

Regi

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
 

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

Top