Results 1 to 4 of 4
  1. #1
    scottb79 is offline Novice
    Windows 10 Office 365
    Join Date
    May 2020
    Posts
    1

    Access default delete behaviour appears counter-intuituve, am I missing something?

    Hi All,

    I'm new to Access but have a fair bit of experience in Excel VBA as well as Oracle (albeit from 20 years ago). I'm developing a small system to help a friend manage his business (plenty of free time in lockdown) and I'm frustrated by the way Access appears to handle data deletion.

    I see this behaviour whether I'm deleting a record directly in a table, in a form or in a datasheet based off that table. When a record is deleted it is immediately removed (i.e. the row/entry disappears), focus moves to the next record and only then is a message displayed asking the user for confirmation of the deletion. If "No" is selected then the row re-appears.

    This is very confusing behaviour for a user (as mine immediately commented on) because the confirmation message appears to be asking whether the user wants to delete the record currently being displayed on screen rather than the one that has already been removed.

    Here are a couple of screenshots to demonstrate:

    Click image for larger version. 

Name:	Deleting record 1.jpg 
Views:	11 
Size:	96.5 KB 
ID:	41877
    Here I right-click on a row (with the FullName of "metric ton") and select Delete Record. The same action can be done using the row selector within a form or datasheet.

    Click image for larger version. 

Name:	Deleting record 2.jpg 
Views:	11 
Size:	120.5 KB 
ID:	41878

    Here you can see the row I request to be deleted has already disappeared (the "ounces" row is now selected) and a dialog box has appeared asking for confirmation of the deletion.


    The process makes it appear that Access is now asking about deleting the "ounces" entry rather than the "metric ton" entry that has already disappeared. It's an easy thing for a user to miss and can see it leading to confusion.

    Is this really the default behaviour? Is there any simple way to change it (and by simple I don't mean having to write code on every single Form_Delete event ? I've tried searching for answers but haven't really found anything useful or simple so hoping somone here can point me in the right direction.

    Sala kahle (Zulu for "stay well")

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    its normal. If you don't want to delete it , don't press delete.
    Grant it , it seems it shouldnt remove it UNTIL you say yes. But here we are.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Perhaps I (for one) had to think about this because
    a) developers develop so that no one is playing around in the tables. That's a 'rule'.
    b) we use action queries or statements and suppress the warnings

    Sure, while adding/removing test data most of us probably play around in tables, but we're used to the behaviour and know what the prompt means. You are correct in saying that the record is not really deleted at that point. You probably don't see such warnings in Excel because you can delete all kinds of data and simply close without saving if you have changed your mind (if need be). Access is not like that at all. Once gone, there is no getting data back like Word or Excel (unless you have a backup db).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Cottonshirt is offline Competent Performer
    Windows 8 Access 2007
    Join Date
    Feb 2018
    Posts
    116
    I don't think of this as counter intuitive; I think of this as a preview of the consequences of your deletion. ACCESS is asking you: are you sure this is what you want? and if what happened was not what you expected you get a chance to go back and change your mind.

    the alternative would be as follows:

    1. you click delete
    2. ACCESS does nothing but asks, are you sure?
    3. you say yes.
    4. ACCESS deletes the record and you immediately notice that it deleted the wrong record, but it's too late because you said you were sure.


    good luck with your project,



    Cottonshirt

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

Similar Threads

  1. Replies: 27
    Last Post: 12-02-2015, 06:09 PM
  2. Access 2013 FE and BE strange behaviour
    By LGrey in forum Access
    Replies: 4
    Last Post: 01-28-2014, 03:00 PM
  3. Strange behaviour of MS Access form
    By selvakumar.arc in forum Forms
    Replies: 2
    Last Post: 08-15-2013, 12:07 AM
  4. Change in behaviour in Access 2007
    By Abacus1234 in forum Access
    Replies: 0
    Last Post: 12-13-2011, 03:44 PM
  5. Replies: 4
    Last Post: 09-06-2011, 05:11 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