ACC2000: No Records Returned in Query Between Access 2000 Table and Linked Access 97 Table
ID: Q244137
|
The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS
No records are returned for a query that joins a Microsoft Access 2000 (Jet 4.0) table to a linked Microsoft Access 97 (Jet 3.5) table. This happens even though you are certain that there are matching records.
CAUSE
This behavior can occur only when all the following conditions are true:
- The query contains an Access 2000 table and a linked Access 97 table.
- The two tables are joined in a one-to-one relationship (Type 1).
- In each table, the linked field has a data type of Text and is indexed.
RESOLUTION
Instead of a join, use a criteria with the keyword Like that compares one field to the other field in the linked tables. For instance, to correct the behavior in the example in the "Steps to Reproduce Behavior" section later in this article, follow these steps:
- Highlight the join between the two tables to select it.
- Press DELETE.
- In the Criteria field under CustomerID from the Customers table, type the following:
Like [Customers1].[CustomerID]
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
MORE INFORMATION
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.
Steps to Reproduce Behavior
- Place an unchanged copy of the sample database Northwind.mdb that is included with Access 97 on your desktop. Do not convert it to Access 2000.
- In Access 2000, open the sample database Northwind.mdb that is included with Access 2000.
- On the File menu, point to Get External Data, and then click Link Tables
- In the Link dialog box, browse to the Access 97 version of the sample database Northwind.mdb, click Northwind.mdb, and then click Link.
- In the Link Tables dialog box, click Categories and Customers, and then click OK. Note that two new linked tables, Categories1 and Customers1, appear in the Database window.
- Create a new query that includes both the Customers table from the sample database Northwind.mdb 2000 and the linked Customers1 table. Note that the tables are automatically joined on the CustomerID field (Primary Key in both, and Text in both).
- Drag the CustomerID field from both tables to the query design grid.
- Run the query.
Note that no records are returned.
- Create a second query that includes the Categories table from the sample database Northwind.mdb 2000 and the linked Categories1 table. Note that the tables are automatically joined on the CategoryID field (Indexed in both, and Numeric in both).
- Drag the CategoryID field from both tables to the query grid.
- Run the query.
Note that all records are returned. In this case, because the joined fields are a Number data type instead of a Text data type, records are returned.
Additional query words:
pra
Keywords : kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug