I have a database with parts, each of which can have multiple vendors. Each vendor-part combination can have multiple pricebreaks. Relations look like this:
The vendor and order_code fields in the pricebreaks are redundant, they are only there to facilitate maintenance.
The relations parts↔part-vendor and part-vendor↔pricebreaks are set to update cascade and delete cascade.
For everyone’s convenience I attached the database (not complete yet).
Data is managed with a form, containing a subform for the part vendors, which in turn has a subsubform for the pricebreaks.
Data entry works like a charm, but when I want to delete a parts record (and expect all associated part-vendor and pricebreak records to be deleted as well because of the cascade setting), I get an error:
The same error (different table) occurs when I want to delete a part-vendor record…
Apparently, the only way to delete a parts record is to start with the pricebreak records, then the part-vendor records and finally the parts record itself…
How do I get the cascade function to work as expected?