Microsoft KB Archive/295223

= ACC2002: &quot;Column Names in Each View or Function Must Be Unique...&quot; Error Message When You Save a Query in an Access Project =

Article ID: 295223

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q295223



Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
When you create a query that contains two or more tables in a Microsoft Access project (.adp), you receive the following error message when you try to save the query:

ADO error: Column names in each view or function must be unique. Column name ' ' in view or function 'dbo. ' is specified more than once.



CAUSE
An alias is not automaticly generated for the second instance of the field name if you use *(all Columns) for both tables and any field names are the same.



RESOLUTION
In the Add Table dialog box, add each field individually by clicking to select the check box next to the field name.



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
 Open the sample database NorthwindCS.adp. In the Database window, click Queries under Objects, and then click New. In the New Query dialog box, click Design View, and then click OK. In the Add Table dialog box, click the Orders table, hold down the CTRL key, click the Order Details table, click Add, and then click Close. Click to select the *(All Columns) check box for both tables.</li> Save the query as View1. Note that you receive the following error message:

ADO error: Column names in each view or function must be unique. Column name 'OrderID' in view or function 'dbo.View1' is specified more than once.

</li></ol>

Additional query words: pra

Keywords: kberrmsg kbbug kbclientserver KB295223

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.