ACC97: "Microsoft Access Can't Represent the Join Expression" Error Message in Query Design (161861)
The information in this article applies to:
This article was previously published under Q161861 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
After you create a query with the Simple Query Wizard in Microsoft Access
97, you may receive the following error message if you try to open the
query in Design view:
Microsoft Access can't represent the join expression
([<TableName>].[<FieldName>] = [<TableName>].[<FieldName>])AND
([<TableName>].[<FieldName>] = [<TableName>].[<FieldName>]) in Design
view.
CAUSE
The Simple Query Wizard adds an extra set of parentheses in the join
expression of the SQL Statement that it creates for the query.
The error occurs if your query meets both of the following conditions:
- If your query is based on two or more tables.
- If two of the tables contain a relationship or join based on a
three-field primary key.
RESOLUTION
There are two methods you can use to work around this problem:
- You can create the query in Design view without using the Simple Query
Wizard.
- You can modify the query's SQL Statement to remove the extra
parentheses. Open the query in Datasheet view, and then click SQL View
on the View menu to see the SQL statement. This is an example of a
portion of the join expression with the extra parentheses:
ON ([tblOne].[Key3] =[tblTwo].[Key3]) AND (([tblOne].[Key1]
=[tblTwo].[Key1]) AND ([tblOne].[Key2] =[tblTwo].[Key2]));
This is how the expression looks with the extra parentheses removed:
ON ([tblOne].[Key3] =[tblTwo].[Key3]) AND ([tblOne].[Key1]
=[tblTwo].[Key1]) AND ([tblOne].[Key2] =[tblTwo].[Key2]);
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.
REFERENCES
For more information about the Simple Query Wizard, search the Help Index
for "Simple Query Wizard," or ask the Microsoft Access 97 Office Assistant.
For more information about creating relationships between tables, search
the Help Index for "relationships, overview," or ask the Microsoft Access
97 Office Assistant.
Modification Type: | Major | Last Reviewed: | 9/27/2003 |
---|
Keywords: | kbbug kberrmsg KB161861 |
---|
|