Relationships?

satty

Board Regular
Joined
Jan 12, 2003
Messages
68
hey people,

im back again...i have a table called tblProduct & a table called tblProfile_PM (many to many link table) and a table called tblMembers_PM.

i have also created a form called frmProduct_Amend. on this form i have inserted a Delete Record command button. when i click this button i get a message saying "record cannot be deleted becuase of a related record in the tblProfile_PM table."

i am aware that this happens becuase the tblProfile_PM table has MemberID and ProductID within it to show the purchases of many members can by many products. the current relationship to the link table is "Inforce Refrential Integriy & Cascade Update Related Fields"

what do i need to do so that when i click the Delete button only a product is deleted and nothing from the tblProfile_PM table?

thanx again guys!


SaTTy
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I don't think you can do what you want to without violating referential integrity. If you have a certain product which has been purchased by various members, when you delete it you're going to have a link table with 'orphaned' records (ie the ProductID won't exist anymore).

One way round it is to include a Discontinued field in your Products table, just check the products that no longer exist for sale. You can then rebuild the queries etc for your forms to only show those products that do exist for sale.
 
Upvote 0

Forum statistics

Threads
1,221,657
Messages
6,161,084
Members
451,684
Latest member
smllchng5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top