Ampersand in command button caption not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    Ampersand in command button caption not working

    I read online that placing an ampersand in the caption of a control will make that control accessible by pressing Alt + the character being underlined. I'm trying to do that, but it isn't working. I have two buttons with the following captions, New Task and Delete Task. I have the ampersand placed at the beginning of each caption so I have New Task and Delete Task. However, pressing Alt + N or Alt + D doesn't do anything. For testing purposes, I have the On_Click event produce a message box that says "It worked", but it doesn't come up. Is there something else that I need to configure to get it to work? I'm using Access 2010.

    I'm working with a command button.
    Last edited by Stewart Ross; Aug 4 '12, 06:48 AM. Reason: Corrected title as mentioned by OP and removed reference to textbox from body of question
  • PGAC
    New Member
    • Jun 2012
    • 7

    #2
    Do you use tabs on the form with the command button? I heard and know first hand that in earlier versions of 2010, tabs seem to interfere with hotkeys (interfere meaning non-functional).

    Comment

    • Seth Schrock
      Recognized Expert Specialist
      • Dec 2010
      • 2965

      #3
      Very interesting. I actually do have tabs on my form. The button is actually in the tab control. Does that matter? Does it work if button is off the tab or does just having the tab break it?

      Comment

      • PGAC
        New Member
        • Jun 2012
        • 7

        #4
        Hi Seth,

        It seems when the form is first opened the hotkey is OK but once the focus goes into a tab the hotkey functionality 'ceases to exist' or at least that is what I have found. I suppose it depends on the form.

        Anyhow, with earlier versions of Access 2010, hotkeys and tabs just don't mix.

        Comment

        Working...