Records in Access forms with Allow Deletions = No can be deleted with Ctrl+Minus sign (-)

Copper Contributor

Tested in Microsoft® Access® for Microsoft 365 MSO (Version 2406 Build 16.0.17726.20206) 64-bit 

A form with Allow Deletions = No the keyboard shortcut CTRL+Minus Sign (-) results in record deletion. I think this is a bug, and probably a recent one, but can't be sure. It's quite serious and has resulted in data loss plus a lot of confusion working out how this could have happened.

2 Replies

Just to add I'm unable to replicate this in a really simple bound form, and will try to work out what form setting allows this to happen.

We've discovered the cause.

The forms in our affected applications have lots of sub-forms on tabs. Where one of these is bound to the same table as the parent record, and where the sub-form has Allow Deletions = Yes, if the user positioned their cursor on the sub-form (certain controls) then uses CTRL + Minus, this results in the deletion prompt. The results of confirming this are variable - presumably depending on the exact sub-form/control data binding - sometimes it really deletes the parent record, other times it appears to do and and breaks the form (ODBC errors - linked SQL Server) but the record actually has not been deleted.
So we can fix this in our application by making sure Allow Deletions = No on the affected sub-forms.