Make Table Query - New Field Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a Make Table Query, how can I have the fields in the new table be
different from the field name in the source table? For example - Expr1 in the
source table should be Name in the destination (new) table.
 
In your query, alias the fields with the name that you want. You do that by
typing a suitable name in front of the field name in the Field row, and add
a colon.

For example, if you currently have:
Expr1: [FirstName] & " " & [Surname]
use:
FullName: [FirstName] & " " & [Surname]

Or if you want to call the City field Suburb:
Suburb: City

BTW, don't use Name as a field name. Nearly everything in Access has a Name
property, so Access will get confused between the name of the field and the
value of the name field on the form, for example.
 
When you look at the query SQL youll see

Select Expr1, Expr2 from tablename

You can change it to
Select Expr1 as NewName1, Expr2 As NewName2 From TableName
=======================================
Or if you have something like
Select Field1 * Field2 As Expr1 From TableName

You can chenge it to
Select Field1 * Field2 As NewName From TableName
 
Worked great - Thanks!

Allen Browne said:
In your query, alias the fields with the name that you want. You do that by
typing a suitable name in front of the field name in the Field row, and add
a colon.

For example, if you currently have:
Expr1: [FirstName] & " " & [Surname]
use:
FullName: [FirstName] & " " & [Surname]

Or if you want to call the City field Suburb:
Suburb: City

BTW, don't use Name as a field name. Nearly everything in Access has a Name
property, so Access will get confused between the name of the field and the
value of the name field on the form, for example.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Racer57 said:
In a Make Table Query, how can I have the fields in the new table be
different from the field name in the source table? For example - Expr1 in
the
source table should be Name in the destination (new) table.
 
Back
Top