Results 1 to 6 of 6
  1. #1
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188

    3 forms - deleting record in one deletes it in all 3

    I have a form "frm_Submission_Planning" that pulls a few fields/data from 2 other forms via a select query. I made those fields locked/read-only on the form. However, when a user deletes a record in frm_Submission_Planning it is deleting the corresponding records in the other 2 forms. Obviously I don't want that. What am I doing wrong? Or more appropriately, what can I do to stop it?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    You do not pull data from forms, but tables, perhaps via queries.
    Presumably they are child records of the parent record you are deleting? Children records cannot exist without a parent.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    Quote Originally Posted by Welshgasman View Post
    You do not pull data from forms, but tables, perhaps via queries.
    Presumably they are child records of the parent record you are deleting? Children records cannot exist without a parent.
    Correct, I am pulling the data from tables via query. I don't know the children/parent relationship. Each form has a table it's built from. The key field is product name. When I delete a product record from frm_Submission_Planning it deletes it from the two tables the other forms are built from.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    So upload your DB, or at least show a picture of your relationships.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    I can't upload the DB. The relationship is one query that connects 3 tables that are linked with Product Name. I tried making the "other" two tables "snapshot" or read-only and that didn't work either. Is there a change I can make in the query?

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    You have not even shown the query code?
    Nor the Relationships window?

    However when you create the query, are the relationships automatically applied?

    That infers, they are set up in the Relationships screen and permanent?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Deleting Invisible forms
    By George in forum Forms
    Replies: 2
    Last Post: 10-10-2017, 03:57 PM
  2. Replies: 8
    Last Post: 09-15-2015, 11:34 AM
  3. Deleting rows deletes all columns in my report
    By Access_Novice in forum Reports
    Replies: 3
    Last Post: 09-19-2013, 06:15 PM
  4. Replies: 4
    Last Post: 07-03-2013, 10:02 AM
  5. Replies: 7
    Last Post: 12-15-2010, 09:46 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