Microsoft KB Archive/251312

= ACC2000: Column Alias Names Are Missing After You Make Changes to an Update Query =

Article ID: 251312

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q251312



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).



SYMPTOMS
You notice that an update query that previously contained one or more column alias names now has none.



CAUSE
This can happen only if all the following conditions are true:


 * It is an update query.
 * The query contains two or more tables that have relationships.
 * You make a change in Design view of the query.



RESOLUTION
Currently there is no resolution or workaround for this issue.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Create a new Access database.  Create a new table named Table1 with the following specifications:   Table: Table1 -  Field Name: IDNUM Data Type: Number

Table Properties: Table1 PrimaryKey: IDNUM  Save and close the Table1 table. For this demonstration, you do not need to enter any data in the Table1 table.  Create a second table named Table2 with the following specifications: <pre class="fixed_text">  Table: Table2 ---  Field Name: IDNUM Data Type: Number Indexed: Yes (No Duplicates)

Field Name: FirstName Data Type: Text

Field Name: LastName Data Type: Text

Table Properties: Table2 PrimaryKey: IDNUM </li> Save and close the Table2 table. You do not need to enter any data in Table2.</li> On the Insert menu, click Query.</li> In the New Query dialog box, click Design View, and then click OK.</li> Click Close in the Show Table dialog box without adding any tables.</li> On the View menu, click SQL View.</li> Type or paste the following Select statement in SQL view:

UPDATE Table1 INNER JOIN Table2 ON Table1.idnum = Table2.idnum SET Table2.firstname = "smith";

</li> On the View menu, click Design View.</li> Save the query as Query1, and then close the query.</li> Reopen the Query1 query in Design view, and then add the alias Fname to the FirstName field. It should look as follows:

Fname: FirstName

</li> Save and close the Query1 query.</li> Reopen the Query1 query. Note that the alias Fname has disappeared.</li></ol>

<div class="references_section">