Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom Shortcut menu bars (Access 97 SR2)

    I am trying to learn how to make custom shortcut menu bars (for right mouse button use) through VBA Modules for use on a form.
    However, the only tutorials I have been able to find seem to be based around creating menus for Excel.

    Would anyone have a tutorial that is specific to Access, or am I missing the point somehow with the tutorials I already have?
    Any help would be much appreciated.

  2. #2
    New Lounger
    Join Date
    Mar 2003
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Shortcut menu bars (Access 97 SR2)

    You can create a shortcut menu by using the following steps:

    On the View menu, point to Toolbars, and then click Customize.
    On the Toolbars tab, click New.
    In the Toolbar Name box, type the name you want, and then click OK.
    On the Toolbars tab, click Properties.
    In the Type list, click Popup.
    Set the AllowCustomizing property the way you want, and then click Close.

    Microsoft Access adds the shortcut menu to the Shortcut Menus toolbar, from which you customize all shortcut menus.

    In the Toolbars box on the Toolbars tab, click Shortcut Menus.
    On the Shortcut Menus toolbar, click the Custom category.

    Put the shortcuts you want in the custom shortcut.

    You can then add the shortcut menu to the Shortcut Menu Bar property in your textbox or form, etc.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Shortcut menu bars (Access 97 SR2)

    Wow, thanks lmarrero, that work perfectly!
    For some reason I was under the impression ShortcutMenus set up in this method were global to the whole DB (i.e. completely replaced the main ones). Not sure where I got that idea from!

    My next task is to change the default key commands for a part of a form, instead of using AutoKeys to set key combos up for the whole DB. I think I can call a Macro on the GotFocus event for where I want the changes in place, but i'm not sure how to reset them when user is out form where I want the changes in place, so they are back to normal.

  4. #4
    New Lounger
    Join Date
    Mar 2003
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Shortcut menu bars (Access 97 SR2)

    I've never tried to do what you're talking about, but there are some events called keydown, keyup and keypress that you may be able to use. If you're using the GotFocus event to activate the keys, then you can use the LostFocus event to get them back to normal.

  5. #5
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Shortcut menu bars (Access 97 SR2)

    I'll see what I can do with them. I'm sure there must be a way, it's just the usual hurdle of finding it!
    Thanks for your help.

Posting Permissions

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