Ignore keydown while code is running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keal
    New Member
    • Jan 2007
    • 2

    Ignore keydown while code is running

    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
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    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!

    Comment

    • keal
      New Member
      • Jan 2007
      • 2

      #3
      Ok, thanks for your help.


      Originally posted by 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!

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        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.
        Code:
        Private Sub Form_KeyPress(KeyAscii As Integer)
        
        End Sub

        Comment

        Working...