cannot delete records added through the subform (1 Viewer)

yugesh437

New member
Local time
Today, 15:30
Joined
Feb 19, 2013
Messages
3
I have 2 sub-forms attached to a main form.
Each of these forms are based on different tables.
Whenever I input the record, it goes into respective tables.
However when I try to delete the record, it only deletes the record from the main form.
I tried cascade delete. However, since referential integrity has to be established, I cannot add the record to my subform because there has to be a corresponding record in the parent table for me to add the record in the subform.
Could I receive some assistance?
 

Beetle

Duly Registered Boozer
Local time
Today, 16:30
Joined
Apr 30, 2011
Messages
1,808
Is there some reason why you don't want to enforce RI? :confused:
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:30
Joined
Feb 19, 2002
Messages
43,374
For cascade delete to work, you must enforce RI.

If your subforms are giving you errors about parentage, try fixing the master/child links. That is what tells Access the fields that the two tables are related on. Once those are set correctly, whenever you add a row to the subform, Access knows where to get the foreign key value.
 

Users who are viewing this thread

Top Bottom