Home » Questions » Computers [ Ask a new question ]

Is it possible to disable Ctrl + A in Access 2007?

Is it possible to disable Ctrl + A in Access 2007?

I want to disable the command Ctrl + A (select all) in Access 2007. Is that possible?

Asked by: Guest | Views: 28
Total answers/comments: 2
Guest [Entry]

"You can use this code in Access to catch CTRL+A and ignore it. The downside is you will have to add this to every form you wish to block. (the upside: you don't have to block every form)

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

Add this to the Form > On Key Down Event

IMPORTANT: Scroll to the bottom of the Event list and change Key Preview to Yes."
Guest [Entry]

"#IfWinActive, ahk_class OMain
^a::Return
#IfWinActive

In the Autohotkey automation language.

Alternatively:

#IfWinActive, ahk_class OMain
^a::MsgBox, Oh god oh god we're all going to die
#IfWinActive"