Search code examples
databasems-accessms-access-2010ms-access-2016

Backspace in access form deletes all records


I have an access form with a textbox that is linked to a database table field, when I do "Ctrl-A and backspace" in the text box, it prompts me with "You are about to delete 124 records". How can I prevent that from happening?

I have tried the code below, but I get the same results, only difference is that the text is not highlighted.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyA And Shift = acCtrlMask Then 'Catch Ctrl+A KeyCode = 0 'Suppress keypress End If End Sub


Solution

  • SOLVED** Just had to put "no" for allow deltions on the form properties.