Dear chippie,
to examine the problem I did the following
create 2 tables
adrbill and adrship
with the following structure
customer text
street text
type text (to take ship resp. bill)
then I made a third table
having a primary key on customer AND street
customer text
street text
ship yes / NO
bill yes / NO
with this query I insert all customers of the table adrship into adrbillship
INSERT INTO adrbillship ( cutomer, street, ship )
SELECT adrship.cutomer, adrship.street, IIf(Not IsNull([type]),True,False) AS ship
FROM adrship;
and now comes the quick and dirty part
with this query I insert all customers of the table adrship into adrbillship if they are not allready inserted
INSERT INTO adrbillship ( cutomer, street,bill )
SELECT adrbill.cutomer, adrbill.street, IIf(Not IsNull([type]),True,False) AS bill
FROM adrbill;
this is quick and dirty as access will only insert those that are not inserted yet, as the others are dismissed because of the primary key violation (shame on me)
the remaining records are normally written in a autocreated Table as failure or error table,
which you now can use to update the records which were in adrship and also in adrbill.
if this table is not created, I could use this update query instead:
UPDATE adrbillship INNER JOIN adrbill ON (adrbillship.street = adrbill.street) AND (adrbillship.cutomer = adrbill.cutomer) SET adrbillship.bill = IIf(Not IsNull([adrbill]![type]),True,False);
HTH
regards Astrid