Deleting

Blue-Apple

New member
Local time
Today, 18:20
Joined
Feb 22, 2005
Messages
6
I have a problem about deleting record from a form, it will be grateful if anyone can help me with this.

Here are my tables:
Par_tor: some personal details such as ID, name, phone NO., etc
Par_tion: the record of who has participated which activities.
Activity: name of the activity.

My problem is: the main form of the my form contains the stuffs in table Par_tor, and the subform contains the stuffs in Par_tion, so the user can view these participator's details and the activities they have participated.

In the main form, I also wanted to created a delete button to delete an entire record (including a participator's detail + his/her participation record) at once, but it didn't work since the participation was in the Par_tion table not in the Par_tor.

So is there any way that I can delete these records at once??

p.s. the view of my form has been attached.
 

Attachments

  • pic.JPG
    pic.JPG
    34.9 KB · Views: 112
In the relationships window, you'll need to define a relationship between the two tables. Select the enforce Referential Integrity box and then check the Cascade Delete option.

If you have orphan records in the many-side table, Access will not allow you to create the relationship. You need to fix the data first.
 
Thanks for your reply!!
But I did construct the relationship among these tables, and it didn't work.

:confused:
 

Attachments

  • relationship.jpg
    relationship.jpg
    29.1 KB · Views: 109
Did you specify the Cascade Delete option?
What does "didn't work" mean?
 
Yes, you are right, I forgot to specify the "Cascade Delete option".
It works fine now, thanks a lot! :)
 

Users who are viewing this thread

Back
Top Bottom