Results 1 to 4 of 4
  1. #1
    achammar is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2019
    Posts
    48

    How to not allow records on a many side of a relationship if the one side is deleted or doesn't exis


    So I have 2 tables with a relationship of 1 to many. How can I assure that if I delete a record on the one side, then all the related ones on the many side are also deleted? I'd like to just have a delete button on my form for the 1 side do it all (which I currently have one that deletes the one side). Is that possible? or any alternative so that both tables stay accurate with each other. I can physically go into either table and delete the record or records that are related in the other table and it lets me do it.. whether or not referential integrity is applied or not. I don't really understand that ... I'm assuming I will have to have a query of some kind to do that, but if it's simpler than that, I'd like that better. I especially don't want to be allowed to have any records in the many side if the 1 side doesn't exist.
    I'm still learning this stuff..

    Thank you very much!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think you'd want referential integrity enforced with the cascade delete option checked.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    achammar is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2019
    Posts
    48
    Thank you! Works great and I learned something new! Thank you very much!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 09-10-2017, 08:13 PM
  2. Replies: 11
    Last Post: 06-23-2017, 10:25 AM
  3. split table and join it again side by side
    By andifi in forum Queries
    Replies: 3
    Last Post: 02-02-2017, 03:24 AM
  4. Replies: 2
    Last Post: 07-25-2016, 01:12 PM
  5. Multiple records side by side
    By Patience in forum Reports
    Replies: 8
    Last Post: 09-01-2010, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums