Question : Disable / enable custom menu items

I have a custom menu that loads when my db starts.  It has a couple of submenus.  Is it possible to disable or even 'hide' some of the submenus based on some critieria that would be checked when my startup form loads?

I am not clear on how to reference them?

Access 2000

Answer : Disable / enable custom menu items

It's fairly straightforward really. The only real issue is when dealing with "submenus" ... that is, your "top level" menu items. In those cases, you must first refer to the parent before you can access it's Controls collection.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Dim cbr As CommandBar 
Dim cbrReports    As CommandBarPopup
   
  On Error GoTo Err_fncMenuDefaults
  
  Set cbr = CommandBars("WorkOrders")
  Set cbrReports = cbr.Controls("Reports")
  
  '/don't really care about errors here ...
  On Error Resume Next
  

    With cbrReports
      .Controls("Open Excel").Visible = False
      .Controls("Email This Report").Visible = False
      .Controls("Close This Report").Visible = False
      .Controls("Configuration").Visible = False
      .Controls("Quick Reports").Visible = False
    End With
Random Solutions  
 
programming4us programming4us