SetMenuItem Method Example

The following example uses the SetMenuItem method to disable the second command in the first menu on the custom menu bar for the active window:

DoCmd.SetMenuItem 0, 1, , acMenuGray