Assuming you don't care with of the 'A' records in table 1 match to 'A'
records in table 2, and you just want to know that there is an extra 'A'
record in table 1, then you can do the following:
Set up 2 queries (one for each table) that is grouped by the field you are
interested in, with a count of those records. Results would look like this
for your example:
tbl1Field CountOftbl1Field
A 3
B 1
tbl2Field CountOftbl2Field
A 2
B 1
C 1
Then write a third query with the following SQL (assuming the queries above
are named qry_Table1Counts and qry_Table2Counts:
SELECT qry_Table2Counts.tbl2Field, qry_Table2Counts.CountOftbl2Field,
qry_Table1Counts.tbl1Field, qry_Table1Counts.CountOftbl1Field
FROM qry_Table2Counts LEFT JOIN qry_Table1Counts ON
qry_Table2Counts.tbl2Field = qry_Table1Counts.tbl1Field
WHERE (((qry_Table1Counts.CountOftbl1Field)<>[CountOftbl2Field])) OR
(((qry_Table1Counts.CountOftbl1Field) Is Null));
You can uncheck the 'Show' boxes for all but the first field if you only
want to see the 'A' and 'C'.
--
Daryl S
Solv123 said:
I am trying to compare two tables to find what does not match. However each
table may have duplicate items but I need each item to have its’own match.
The Unmatch query does not work
For example
Table 1
A
A
A
B
Tabe2:
A
A
B
C
I want my result to show
A
C
If I run the unmatch query my result is just C.