"Javier Gomez" <ja*****************@gmail.com> wrote in message
news:89**************************@posting.google.c om...
How to block Crtl + Break keys if any Error or MsgBox shows ???
I tryed with this code buy it looks it does not work.
Private Sub Form_KeyPress(KeyAscii As Integer)
If Chr$(&H4) + Chr$(70) Then 'CTRL-BREAK
MsgBox "No valid option"
docmd.cancel
End If
End Sub
Can anybody help me ?
Certainly you could use Chuck's suggestion of avoiding the message box
altogether, but perhaps you should explain why you need this. If you need
to prevent people seeing/editing the code then you could use a compiled mde
file which makes this impossible. If you are trying to keep out the mildly
curious amateur then you could simple select Tools>Startup and not allow
Access special keys, although this would not be as secure as the first
suggestion.