As long as the data is entered *exactly* the same in each table, you can
create a new query that includes the two tables. Drag a join from each field
in one table to it's similarly named field in the other table, for example
LastName to LastName, FirstName to FirstName, etc. The join should be the
default Inner Join. Add at least one field from either table to the QBE grid.
When you run this query, it should return records where the values are exact
matches.
Then convert the query to a totals query, and change the Group By to Count.
Add a suitable alias to the field that you are displaying. A column alias is
separated from the field name with a colon in query design view, and occurs
on the left side. The corresponding SQL statement uses the AS keyword to show
the alias.
Try the following query in the sample Northwind database. First, create a
copy of the Employees table (structure + data). Name this table "Employees2".
Change some data in one or both tables, keeping track of how many records you
have changed. Create a query with the following SQL statement:
SELECT Count(Employees.City) AS [Matching Records]
FROM Employees
INNER JOIN Employees2
ON (Employees.PostalCode = Employees2.PostalCode)
AND (Employees.Address = Employees2.Address)
AND (Employees.FirstName = Employees2.FirstName)
AND (Employees.LastName = Employees2.LastName);
Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________