ACC: Two Tables Automatically Joined in QueryID: Q113885
|
Moderate: Requires basic macro, coding, and interoperability skills.
If you create a query based on two or more tables that have matching field
names with matching data types, and one of the tables has a primary key
defined, Microsoft Access will automatically join the tables on the
matching field names.
Create the table relationships that you want in the Relationships window
before you create new queries. If you do not create the relationships that
you want first, you will have to delete the automatic join line in the
query.
In Microsoft Access 7.0 and 97, you may disable AutoJoin entirely by
clicking Options on the Tools menu, clicking the Tables/Queries tab, and
clearing the check box labeled "Enable AutoJoin."
This behavior is by design.
Table: Employees
-------------------------------
Field Name: ID
Data Type: AutoNumber (or Counter in version 2.0)
Indexed: Yes (No Duplicates)
Table Properties: Employees
-------------------------------
PrimaryKey: ID
Table: Customers
-------------------------------
Field Name: EmployeeID
Data Type: Number
Field Size: Long Integer
Indexed: No
Field Name: ID
Data Type: AutoNumber (or Counter in version 2.0)
Indexed: No
For more information about joining tables in queries with join lines, search for "join," and then "join tables" or ask the Microsoft Access 97 Office Assistant.
Keywords : QryJoin
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 3, 1999