Suzanne,
I think what you are referring to is a "Full Outer Join". Assuming that you
have two tables that are similar, but contain records that may or may not
correspond, and you want to creat a query that has all the records from A and
B. Unfortunately, Access does not have a simple way to accomplish this.
However, the approved workaround is not too difficult.
1. Generally, I start by creating the left join:
SELECT A.Field1, A.Field2, A.Field3, B.Field4
FROM tableA as A LEFT JOIN tableB as B
ON A.Field1 = B.Field1
This will give you all the records from A, and only those from B that match.
2. Then go to the SQL view and add the following:
UNION
SELECT B.Field1, B.Field2, B.Field3, B.Field4
FROM tableB as B LEFT JOIN tableA as A
ON B.Field1 = A.Field1
WHERE A.Field1 IS NULL
3. So the final query would look like
SELECT A.Field1, A.Field2, A.Field3, B.Field4
FROM tableA as A LEFT JOIN tableB as B
ON A.Field1 = B.Field1
UNION
SELECT B.Field1, B.Field2, B.Field3, B.Field4
FROM tableB as B LEFT JOIN tableA as A
ON B.Field1 = A.Field1
WHERE A.Field1 IS NULL
Keep in mind, that in a UNION query, you have to have the same number of
fields in each portion of the union, and the field types must correspond.
If this doesn't answer your need, post back with more info on the two tables
(fields) you want to include in the query, and we'll see what we can do.
--
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.