Results 1 to 7 of 7
  1. #1
    iordanis is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2024
    Posts
    13

    In a query (or form based on it) I delete a row, but after requery, the row reappears.

    In a query (or form based on it) I delete a row, but after requery, the row reappears without any message telling me that the query is not updateable. The row disappears correctly and all events are fired, but no record gets deleted. My query uses 6-7 linked tables and two outer joins (although I don't know if it matters)



    The thing is that if I delete the master record directly from the access table, it IS deleted. So it must be the query. But why is access accepting it for delete, but doesn't delete it?

  2. #2
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    You referred to events so I take it that you're doing this in code, so post the code (within code tags - use # button on posting toolbar). Or set a break point in the first event and step through (F8) the code and watch how it executes. My guess is that you've disabled warnings or something similar, like used On Error Resume Next.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Or provide your db for analysis - follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    iordanis is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2024
    Posts
    13
    I just sent the schema with some data and the query that behaves just like the form itself. Open the query and delete a record. Then requery. The record reappears.


    Database1.zip

    In order to move on with my project, i have the deletion done by code in the Delete event of my form, which actually deletes the master and detail records (cascaded), but i also get a 3197 error. My app has attached tables (MDE/MDB) and either has the "no locks" activated.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    And a 3197 error is?
    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

  6. #6
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    Delete the circled relationship and the query will delete properly. This view is the relationship view, not the query design view.

    Note: This solution is flawed. I could not get it to repeat properly when I came back later to check. My apologies.

    Click image for larger version. 

Name:	fixit.png 
Views:	13 
Size:	128.1 KB 
ID:	53009
    Last edited by davegri; 05-12-2025 at 11:19 PM.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Nevermind, now I see Dave's response.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-13-2022, 03:44 AM
  2. AfterUpdate requery does not requery list box
    By ittechguy in forum Programming
    Replies: 5
    Last Post: 09-05-2017, 08:51 AM
  3. Replies: 3
    Last Post: 11-16-2016, 09:24 AM
  4. Replies: 4
    Last Post: 01-11-2016, 08:50 AM
  5. Replies: 2
    Last Post: 10-10-2012, 07:01 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