Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    control keyboard behavior (Access 97 (SR2))

    On 99% of the people who use a handy-dandy application I've set up, when they hit the Enter key on an input form, the cursor goes to the next field on the form. However, on this one person's machine, instead of going to the next field, it goes to a new record. It's not possible to get this user to change their Tools/Options/Keyboard, so is there a way to set the keyboard option to move to the next field and not the next record when this form is opened? It's driving everyone crazy.
    Carpy Diem, it's .

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: control keyboard behavior (Access 97 (SR2))

    It seems strange to adapt an application that works fine for just one recalcitrant user...

    You can do the following:
    Open the data entry form in design view.
    Set the KeyPreview property to True to handle keyboard events at the form level.
    Create a KeyDown event procedure for the form:

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then KeyCode = vbKeyTab
    End Sub

    This transforms an Enter into a Tab. You will have to test whether this has undesired side effects.

    When the user presses Enter or Tab in the last control in the tab order, the form will still go to the next record, unless you set the Cycle property of the form to Current Record.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: control keyboard behavior (Access 97 (SR2))

    Yes, this is strange, but to make a long story short, the user's a bit odd. I've heard that they are impossible to train and so to try to tell them there's something "wrong" with their p.c. would cause them to, well, <img src=/S/flee.gif border=0 alt=flee width=25 height=25>

    I'll try out your suggestion, Hans, and let you know how it goes.
    Carpy Diem, it&#39;s .

  4. #4
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: control keyboard behavior (Access 97 (SR2))

    <hr>It's not possible to get this user to change their Tools/Options/Keyboard<hr>

    Check out the GetOption, SetOption Methods in Help.
    I've never used them but it could provide you with a way to programatically save everyone's sanity within your App.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: control keyboard behavior (Access 97 (SR2))

    Add to what SteveH has suggested, if your application front-end is deployed to individual workstations, then if you activate security you could check the userID and set the Option for that user only.
    Wendell

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: control keyboard behavior (Access 97 (SR2))

    I wish. But sadly, no.

    What I did was use Han's idea, plus (after I found I could go to a new record by hitting the Enter key past the last field on the form), I set the Cycle on the form to be "Current Record". So now when someone <IMG SRC=http://www.wopr.com/S/doze.gif alt="nods off"> with their finger on the Enter button, they won't end up creating 59 or so useless forms.

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Hans, Steve and Wendell!
    Carpy Diem, it&#39;s .

Posting Permissions

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