• Cannot access Menu’s hotkeys (A2K SR1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Cannot access Menu’s hotkeys (A2K SR1)

    Author
    Topic
    #379233

    I have a StartupMenuBar which was opened in a StartupForm. The startup form was not closed until the user closed the program.

    The startup menu has a few menu items which I can access without problem using the mouse, but I can’t access them using the menu’s ALT hotkey. The hotkey alphabets were unique and there was no redundancy.

    When I exit the program to the Access database windows and run the menu-creating routine from the VBA editor, I could access each of the menu using the ALT hotkey. It looked like the ALT hotkey could not be accessed or active in a form, though accessing and running the item items with the mouse was okay.

    Is there anything amiss?

    Another related question: We can set a StartupForm in Access, but can we set a Sub to run automatically when an Access application is run without using the AutoExec macro and without putting the Sub in a form? Can we name a Sub as AutoExec so that it will run automatically when the program is run?

    Viewing 0 reply threads
    Author
    Replies
    • #630740

      Don’t have answer to first question, when I use custom menus the hotkeys work. Answer to 2nd question is No. Naming a sub “AutoExec” will have no effect on startup (try it and see). You have to run the code from startup form or AutoExec macro. What I normally do is create AutoExec macro with one action, RunCode, that runs the specified sub on startup. The sub has to be declared as a function when using RunCode action. This is no different than running code directly. Except, if startup options are bypassed, the code does not run. I don’t know of any way to get around this limitation – there’s no such thing as an “Application On Open” event procedure – other than to use security & other methods to ensure startup options aren’t bypassed.

      HTH

    Viewing 0 reply threads
    Reply To: Reply #630740 in Cannot access Menu’s hotkeys (A2K SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel