Change Query Field Name

  • Follow


Hello,

I have a query with the field name "LastName". When I pull a report and 
export it to excel at the top of the column it come out as "LastName". How 
can I change it in the query so when I export to excel the column heading 
says "Customer/Entity Name?

Thanks!!
0
Reply Utf 10/17/2007 5:05:02 PM

Use an alias:

SELECT LastName AS [Customer/Entity Name]
FROM TableName;

-- 

        Ken Snell
<MS ACCESS MVP>


"Stockwell43" <Stockwell43@discussions.microsoft.com> wrote in message 
news:D8C930C5-902F-415B-B3C9-F82BE6DF4FD9@microsoft.com...
> Hello,
>
> I have a query with the field name "LastName". When I pull a report and
> export it to excel at the top of the column it come out as "LastName". How
> can I change it in the query so when I export to excel the column heading
> says "Customer/Entity Name?
>
> Thanks!! 


0
Reply Ken 10/17/2007 5:55:36 PM


On Wed, 17 Oct 2007 10:05:02 -0700, Stockwell43 wrote:

> Hello,
> 
> I have a query with the field name "LastName". When I pull a report and 
> export it to excel at the top of the column it come out as "LastName". How 
> can I change it in the query so when I export to excel the column heading 
> says "Customer/Entity Name?
> 
> Thanks!!

In the query grid, instead of the column LastName, write:
Customer/Entity Name:[LastName]
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
Reply fredg 10/17/2007 6:01:39 PM

2 Replies
1229 Views

(page loaded in 0.065 seconds)


Reply: