Controls.FaceId numbers


  • While reading through many posts about creating custom popup, shortcut, or toolbar menus using VBA, a common issue is brought up.   The FaceId number associated with the icon is a big mystery.  Trial and error or searching through the internet for old lists is what people resort to.
    Application.CommandBars.Add(MenuName, msoBarPopup, False, False).Controls.Add(msoControlButton, , , , True).FaceId = ???

    In Access Options under “Quick Access Toolbar” if you choose “All Commands” in the “Choose commands from” drop down, you will see in the scroll list all the commands and their icons but not their IDs.  

    I’d like to create a Form with a combo or list box like the one in Access Options/“Quick Access Toolbar” that includes the Icon, Command name and FaceId number.

    Is that possible?
    Has it been done before?
    Where should I start?

    I came across code to create a Toolbar in Excel but it didn’t work in Access 2010.


    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.

    Friday, August 02, 2013 3:50 PM

All replies

  • I don't know what a FaceId is, but starting with Access 2007, you can execute idMso commands with the following:

    Application.CommandBars.ExecuteMso (idMso As String)

    For example: Application.CommandBars.ExecuteMso ("RecordsDeleteRecord")

    idMso's do not use numbers, they use string text.

    Each idMso also has a corresponding ImageMso. These can be found by clicking Office Button>>Access Options>>Customize. Each command idMso is revealed when you hover the cursor over the command (in parentheses).

    Microsoft also has a list you can download at:

    You can use drop-down combo boxes in custom Ribbons as well. They appear in the Ribbon, not on a form, but you can create a custom Ribbon for a particular form too. I suspect idMso's replaced what you are calling FaceId's but am not sure. I have never attempted what you are trying, but investigating idMso commands may be a place to start. You could certainly create a list box with a list of commands to choose from where a selection fires a macro or VBA command. Using an icon in a list box is another story. You can also include Quick Access Toolbars in a Custom Ribbon.

    Why don't you post a list of the commands you would like to execute on the form and then we can get a better idea of the best way to guide you. The best way may not be a drop-down combo box at all.

    Friday, August 02, 2013 9:12 PM
  • Thanks for the reply.  I was not aware that "Each command idMso is revealed (in parentheses) when you hover the cursor over the command."  I already had the Microsoft list you mentioned.  So now when I need to find the FaceId of an icon (also listed as the Policy ID in the Microsoft Excel sheet list) I first hover over the icon/command in Access Options/“Quick Access Toolbar” get the revealed idMso (also listed as Control Name in the Microsoft Excel sheet list) and get the Policy ID from the last column.  Kind of troublesome but it will work.  Never the less I will continue to seek out a better way to list the ICON, idMso(Control Name), and FaceId(Policy ID) all in one toolbar or list box. 

    When I create a custom popup(shortcut) menu for an Access 2010 report some of the menu items run my code instead of a default command like E-mail -> Control Name = "FileSendAsAttachement" and Policy ID = 2188.  You'll see E-mail has a nice icon of a paperclip over a mail envelope.  I can use that icon in my shortcut menu but run my code on click instead of the default FileSendAsAttachement action.  My code can pre-populate the email with email recipients, CC’s, subject line, and add the attachment. I’m just trying to make it easier for developer to polish their custom popup shortcut menus with icons.

        Set CBB = CB.Controls.Add(msoControlButton, , , , True)
        CBB.Caption = "Send E-mail..."
        CBB.Tag = "Send E-mail..."
        CBB.FaceId = 2188
        CBB.OnAction = "=myMessage()"

    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.

    Friday, August 02, 2013 10:24 PM