Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Thanked 0 Times in 0 Posts

    Cannot access menu using Alt shortcut (A2K SR1)

    My program has a menu bar docked to the top of the screen. Everything work as expected except one - I can't use the Alt short-cut to access the menu despite each menu has a different marked (underlined) character. For example in the &Fail menu codes below, I can't use Alt-F key combination to access the menu, though accessing it using the mouse is no problem:

    Dim MBar As CommandBar
    Dim MBarMenu As CommandBarControl

    ' Create a new menu bar and dock it to the top
    Set MBar = CommandBars.Add(strNamaMenu, msoBarTop, True, False)
    With MBar
    .Position = msoBarTop
    .Visible = True ' Make the menu bar visible
    .Protection = msoBarNoMove ' Prevent users from undocking the menu bar
    End With

    ' Create Fail popup control on the bar and set its caption
    Set MBarMenu = MBar.Controls.Add(msoControlPopup)
    MBarMenu.Caption = "&Fail"

    Can anyone tell me the cause of it? Does it have anything to do with Access setup? Thanks in advance.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Newbury, Berkshire, England
    Thanked 0 Times in 0 Posts

    Re: Cannot access menu using Alt shortcut (A2K SR1)

    Not much experience with this, have I! But I will make an educated guess. Could it be the ALT "F" combination calls the "FILE" command in Windows. I would suggest you use the "A" in f"A"il as your ALT letter combination to call the file command like this:
    MBarMenu.Caption = "f&Ail"

    If that don't work I haven't got a clue!

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Cannot access menu using Alt shortcut (A2K SR1)

    As Rupert has suggested, the usual reason a shortcut key doesn't work is because there is already a shortcut that uses that combination. If you have two hotkeys visible at the same time using the same shortcut, neither of them will work properly. Try using one of the other letters as the shortcut and see if that cures the problem.

Posting Permissions

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