G
Guest
I have two tables whereby Table1's ID field (autonumber) is linked (1 to
many) on the Table2 fldID field.
It is possible for records from Table2 to be deleted without disturbing the
"parent" record in Table1. I would like to get rid of the parent record in
Table1 if there are no corresponding records in Table2. The problem is
slightly more complicated in that I cannot delete all records in Table1 with
no records in Table2. A couple of conditions for the Table1 records must be
set.
For example:
DELETE the record(s) from Table1 WHERE Table1.fld2 <>"Value" AND Table1.fld3
= "value" AND WHERE Table2.fldID is Null (those that do not have any
corresponding records in Table2).
An Unmatched Query correctly identifies the records to be deleted but I
can't get the delete query to work.
many) on the Table2 fldID field.
It is possible for records from Table2 to be deleted without disturbing the
"parent" record in Table1. I would like to get rid of the parent record in
Table1 if there are no corresponding records in Table2. The problem is
slightly more complicated in that I cannot delete all records in Table1 with
no records in Table2. A couple of conditions for the Table1 records must be
set.
For example:
DELETE the record(s) from Table1 WHERE Table1.fld2 <>"Value" AND Table1.fld3
= "value" AND WHERE Table2.fldID is Null (those that do not have any
corresponding records in Table2).
An Unmatched Query correctly identifies the records to be deleted but I
can't get the delete query to work.