Delete Query

binksmatthew

Registered User.
Local time
Today, 22:31
Joined
Mar 3, 2007
Messages
21
is there any way that i can delete records from two different tables using the same delete query as i have them linked in the relationships using Member ID and if i try to delete from one of the tables then and error message appears stating that key violation has occurred.
Thanks
 
Cascade Deletion in your relationships table will delete the related subrecords when the main record is deleted. See Tools\Relationships...; double-click on a connecting line for the related tables... you'll be able to edit relationships if you have permissions to do so and the relationship is editable (not greyed out)

For example a MEMBER is related to several monthly Membership payments. When deleting the Member without cascade delete, the error occurs because the payments would then not have a related record if the member is deleted. You could delete any payment though as those are not required. This is a one to many relationship example. 1 member has many payments.

IF referential integrity is established in the relationships and cascade delete is checked then when the member is deleted all his/her payment history/records are deleted as well.

I hope that helps,

Goh
 
thanks. it works fine now. i tried just about everythng under the sun except that.
 

Users who are viewing this thread

Back
Top Bottom