• Cannot access menu using Alt shortcut (A2K SR1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Cannot access menu using Alt shortcut (A2K SR1)

    Author
    Topic
    #378814

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #628445

      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!

    • #628534

      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.

    Viewing 1 reply thread
    Reply To: Cannot access menu using Alt shortcut (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: