Results 1 to 3 of 3
  1. #1
    Farida is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    19

    Question Deleting Child table record

    Hi, I have two tables in my access database with Parent Child relationship.
    Click image for larger version. 

Name:	RELATIONSHIP.JPG 
Views:	16 
Size:	32.5 KB 
ID:	21206



    Then i have below query based on which i have a datasheet form.

    SELECT MOC_EMERGENCY.[MOC NUMBER], MOC_EMERGENCY.PERMANENT_MOC, MOC_DATA.TITLE
    FROM MOC_DATA INNER JOIN MOC_EMERGENCY
    ON MOC_DATA.[MOC NUMBER] = MOC_EMERGENCY.[MOC NUMBER]

    When i delete a record in this form, my parent table record (in MOC_DATA table) is automatically deleted. Please advise how can this be corrcted or if you need more information. Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Dont use this join query.
    Use ONLY the child table using the criteria key= forms!frmData!ID

    this will involve ONLY the child table

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What exactly do these tables represent? In my view your table structures are incorrect?
    You have the relationship(join in this case) between Primary Keys.

    You should review Normalization.

    Good luck with your project.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-23-2014, 09:48 PM
  2. Child Record Created, but won't display in child form
    By CementCarver in forum Programming
    Replies: 1
    Last Post: 04-10-2013, 12:42 PM
  3. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  4. Enter or Update Child Record?
    By mkling in forum Access
    Replies: 7
    Last Post: 06-05-2012, 08:09 AM
  5. Replies: 11
    Last Post: 12-14-2010, 01:25 PM

Tags for this Thread

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