By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,160 Members | 974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,160 IT Pros & Developers. It's quick & easy.

Naming fields in a make table query

P: n/a
Is there a way to specify different field names in a temporary table
created using VBA? I just inherited a program and now the users want to
export results to Excel. The original programmer only provided printed
reports, so field names did not matter. The temp table is created using
a query. When I export it to Excel it uses the table field names from a
temp table (for example: SumOfLMNRKeyedNoABN). The users find this
confusing and would like to see something like TotalNoABN.

Jan 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a

My apologies. The VBA only calls an existing query. I have tried
entering a description and a caption and both are ignored when the
tbltemp is created.

Jan 5 '07 #2

P: n/a
Zammy,

There are a lot of things you can use, but the easiest would be to make a
query that changes the names in the table to the names you want and then
export the query, not the underlying table.

Hope this helps,

Gary

"Zammy" <za***@zamjohn.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
Is there a way to specify different field names in a temporary table
created using VBA? I just inherited a program and now the users want to
export results to Excel. The original programmer only provided printed
reports, so field names did not matter. The temp table is created using
a query. When I export it to Excel it uses the table field names from a
temp table (for example: SumOfLMNRKeyedNoABN). The users find this
confusing and would like to see something like TotalNoABN.

Jan 5 '07 #3

P: n/a
"Zammy" <za***@zamjohn.comwrote in
news:11*********************@42g2000cwt.googlegrou ps.com:
Is there a way to specify different field names in a temporary
table created using VBA? I just inherited a program and now
the users want to export results to Excel. The original
programmer only provided printed reports, so field names did
not matter. The temp table is created using a query. When I
export it to Excel it uses the table field names from a temp
table (for example: SumOfLMNRKeyedNoABN). The users find this
confusing and would like to see something like TotalNoABN.
Sure there is. There is no need even to make a temporary table,
because Access exports query results to Excel just as
efficiently as making a table and exporting the table.

Either way, open the query in design view. You'll see the column
names in the top row of the spreadsheet. To assign a name to a
column, just insert the new name to the left of the existing
one, followed by a colon.

to use your example
SumOfLMNRKeyedNoABN becomes TotalNoABN:SumOfLMNRKeyedNoABN

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jan 5 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.