Adding an item into Access menu under Add-In tab

-- -- 892 Reputation points
2022-11-28T21:25:36.437+00:00

Hi

I have a menu from Access 2000 days which appears under Add-In tab. How can I add additional items to this menu such as new Access reports? Can I do it programmatically?

I have tried

      Dim msoControlButton, newItem  
        
      msoControlButton = 1  
        
          Set newItem = CommandBars("Main Toolbar").Controls("Reports").Add(Type:=msoControlButton)  
    With newItem  
        .BeginGroup = True  
        .Caption = "Client Forecast - Quote"  
        .FaceID = 0  
        .OnAction = "Date Range Forecast - Quote"  
    End With  

but it says 'Object doesn't support this property or method' on line 5 above.

Thanks

Regards

264982-accessmenu.png

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
853 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Eugene Astafiev 891 Reputation points
    2022-11-29T10:43:08.877+00:00

    CommandBars were deprecated and shouldn't be used for customizing the ribbon UI any longer. Instead, you need to use the Fluent UI (aka Ribbon UI). Read more about the Fluent UI in the following series of articles:

    0 comments No comments