Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Dec 2001
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    F1 Key (Acc2000)

    Any ideas on how to stop the F1 key from displaying the help screens?

    To make a long story short, I have a subform that executes a private sub on the main form. The user presses F1 which is intercepted with the Sub Form_KeyDown (KeyCode=vbKeyF1), which in turn sets a public variable to true, then sets focus on the main form button. The main form button GotFocus event checks the public variable and if True executes the Click event sub for that button. Everything works very well, except that after the process has completed, the Access help window opens. The main form also has a shortcut to execute the command button click event (also F1), but help windows do not open when F1 is pressed on the main form.

    There may be a better way to do this, but the users are long accustomed to using the F1 key to "process" the data after entering, and I really don't want to require exiting the subform to press F1 on the main form.

    Any ideas are greatly appreciated.

    Thnaks,

    W

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: F1 Key (Acc2000)

    Create an AutoKeys macro in your database. In design view of the macro under macro name, use {F1} and assign the action CancelEvent. That will cancel F1 calling help, but doesn't affect the KeyDown event.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: F1 Key (Acc2000)

    Hi W

    This doesn

  4. #4
    New Lounger
    Join Date
    Dec 2001
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: F1 Key (Acc2000)

    Thanks for the tip, but it apparently also cancels all events on the main form, that is, the GotFocus event for the main form F1 button never fires, nor does the form GotFocus. The focus does, however, change to the F1 button on the main form, so I added a SendKeys "{ENTER}" to the KeyDown function and it seems to work ok.


    Thanks again,
    Warren

  5. #5
    New Lounger
    Join Date
    Dec 2001
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: F1 Key (Acc2000)

    Thanks John

    This approach would not be my first choice either, except that this is a replacement front end data entry program, and the more that it feels like the existing interface the less training that must be done and fewer keyboard mistakes (old habits die real hard around here).

    Thanks again,

    Warren

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: F1 Key (Acc2000)

    Sorry, but what do you mean by the "F1 buton on the main form"? You asked about the F1 key, and I suggested a solution for disabling the F1 *key*, not a form button.
    Charlotte

  7. #7
    New Lounger
    Join Date
    Dec 2001
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: F1 Key (Acc2000)

    By F1 button on the main form I mean a command button that has its on-click event code executed by the f1 key as well as by clicking the button itself with the mouse. The users are frightened <img src=/S/flee.gif border=0 alt=flee width=25 height=25> by mice, so I am developing this whole project with the mouse strictly optional.

    In any case your suggestion saved the day. Thanks again,

    Warren

Posting Permissions

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