panchitocarioca
Registered User.
- Local time
- Yesterday, 19:14
- Joined
- Aug 11, 2008
- Messages
- 11
Hi,
I have a small question. I have a database in which in the background action queries (through vba docmd.runsql "insert etc....") are run in some situations (the user does not see it happening). However, by pressing escape, the action queries can be cancelled. I would like to prevent this from happening. Is there any way to disable the escape key?
I have tried the "standard solution" to disable the escape key. In the form from which the action queries are run, i have put in the "on key down" event the following code (and put the keypreview to yes):
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then ' 27 is the Escape Key
* KeyCode = 0
End If
End Sub
However, the above code does not prevent pressing escape from stopping the action queries. It only prevents that changes in a form that have not been saved can be "undone" by pressing the escape key.
Anybody got any idea?
Many thanks in advance.
Best regards,
I have a small question. I have a database in which in the background action queries (through vba docmd.runsql "insert etc....") are run in some situations (the user does not see it happening). However, by pressing escape, the action queries can be cancelled. I would like to prevent this from happening. Is there any way to disable the escape key?
I have tried the "standard solution" to disable the escape key. In the form from which the action queries are run, i have put in the "on key down" event the following code (and put the keypreview to yes):
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then ' 27 is the Escape Key
* KeyCode = 0
End If
End Sub
However, the above code does not prevent pressing escape from stopping the action queries. It only prevents that changes in a form that have not been saved can be "undone" by pressing the escape key.
Anybody got any idea?
Many thanks in advance.
Best regards,