By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,471 Members | 2,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,471 IT Pros & Developers. It's quick & easy.

Ignore keydown while code is running

P: 2
Hi,

I have a database with a form and when a user presses a button on the form it runs some vba code, what i would like to do is prevent the users from stopping the code before the subroutine has ended.

Is there a way to make access ignore all keypresses?

keal

Using: Access 2002, Windows XP
Jan 3 '07 #1
Share this Question
Share on Google+
3 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

Usually when a subroutine is activated, the users can't desactivate it pressing other keys!

When the subroutine is executed an other is activated in function of pressed key!

I don't think that in the middle of routine, the executed one will be stoped and activated an other one!

at least the both can be activated running simultanely! but i doubt it!
Jan 3 '07 #2

P: 2
Ok, thanks for your help.


Hi,

Usually when a subroutine is activated, the users can't desactivate it pressing other keys!

When the subroutine is executed an other is activated in function of pressed key!

I don't think that in the middle of routine, the executed one will be stoped and activated an other one!

at least the both can be activated running simultanely! but i doubt it!
Jan 3 '07 #3

NeoPa
Expert Mod 15k+
P: 31,186
The Ctrl-Break key combination will normally allow an operator to break into the code, causing it to stop.
To avoid this, or any other keystrokes, you could look at the KeyPress event.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_KeyPress(KeyAscii As Integer)
  2.  
  3. End Sub
Jan 3 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.