Sorry, Albert, but that won't work: you've included an unnecessary
semi-colon in the first subselect.
SELECT id, CustId FROM A1
UNION ALL
SELECT id, CustId FROM A2;
Note that if the same id occurs in both A1 and A2, it'll show up twice in
that query. If you only want it to show up once, use
SELECT id, CustId FROM A1
UNION
SELECT id,CustId FROM A2;
If the same id occurs in both, but different CustID values are associated
with them, they'll still both appear.
If you have a need to keep track of which table each record came from, use
SELECT id, CustId, "A1" AS Source FROM A1
UNION ALL
SELECT id, CustId, "A2" AS Source FROM A2;
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Albert D. Kallal" <(E-Mail Removed)> wrote in message
news:O6%23K%(E-Mail Removed)...
> Just open up the query builder, and jump to sql view.
>
> Paste in your two quires with a "union all" command like
>
> select id,custID from A1;
>
> union all
>
> select id,CustId from A2;
>
> Ok, now save the query. The resulting query can be used for reports, or
> even exporting
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> (E-Mail Removed)
>
>