From: John Spencer on
I can't say this is happening and can't test to see if this behavior is
different in 2007 versus 2003.

I would check that there is no Caption property set for the fields. Access
tends to display that as a column header (name) when you are displaying the
results of a query in datasheet view. Besides checking the fields in the
tables, check the caption property of the fields in the query if you are using
query design view.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Joe wrote:
> Hi John
>
> The name Code was just an example.
>
> Anything I type, a regular text or even a name - Robert - for example, it
> doesn't work.
>
> I'm using a Access 2007 in Brazilian-portuguese version.
>
> This customized version could be the problem? In positive case, is there a
> solution?
>
> Thanks in advance for your time and answer.
>
> Joe
>
>
>
>
>
>
> "John W. Vinson" <jvinson(a)STOP_SPAM.WysardOfInfo.com> escreveu na mensagem
> news:3hium51fd7ah2gmj21hfmnqkkg159ud1l1(a)4ax.com...
>> On Sun, 7 Feb 2010 20:31:19 -0200, "Joe" <j.l.pires(a)uol.com.br> wrote:
>>
>>> Hi
>>>
>>> Using an expression as follows...
>>>
>>> SELECT IDCustomer AS Code, Name, Address FROM Customers
>>>
>>> ...the AS clause doesn't work in Access 2007.
>>>
>>> Running the query, the column caption remains IDCustomer.
>>>
>>> What is the problem? Why this happens?
>>>
>>> Is there any solution (except back to 2003)?
>>>
>>> Thanks in advance for your help.
>>>
>>> Joe
>>>
>> This is probably another reserved name. 2007 is much pickier about using
>> reserved words (Code, Date, Order, etc.) as fieldnames.
>>
>> Does it work if you use AS CustomerCode? Or you might try
>>
>> AS [Code]
>>
>> --
>>
>> John W. Vinson [MVP]
>
>