Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Posts
    63

    Unanswered: Access not picking up Enter Key

    I'm trying to run a query when a user hits the Enter key in a textbox. On my workstation, everything runs fine. However, on some machines, Access isn't recognizing the Enter key being pressed. Here's an example code

    Code:
    Private Sub Receipt__KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    MsgBox ("derp")
    Else
    MsgBox ("herpity derp")
    End If
    As I type in the textbox, Access will display "herpity derp" but when I hit the Enter key, it skips to the next textbox. What am I doing wrong?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Check the "Move after Enter" option parameter. In Access 2003 it's in the Options Menu --> "Keyboard" tab.

    You can also use the KeyDown event instead of KeyEnter.
    Have a nice day!

  3. #3
    Join Date
    Jul 2011
    Posts
    63
    Quote Originally Posted by Sinndho View Post
    Check the "Move after Enter" option parameter. In Access 2003 it's in the Options Menu --> "Keyboard" tab.

    You can also use the KeyDown event instead of KeyEnter.
    We have Access 2007 and I can't find any option for Keyboard

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Click on the "Office" button (upper-left corner) then click on the "Access Options" button and select the "Advanced" group.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •