Re: enable / disable submenu items

From: Jeff Conrad (jeffc_at_ernstbrothers.com)
Date: 11/18/04


Date: Thu, 18 Nov 2004 14:36:59 -0800

You're welcome Wes, glad to help.
Yes, you can continue as far down the menu structure as you need to go using the same syntax.

-- 
Jeff Conrad
Access Junkie
Bend, Oregon
"Wes Peters" <me@here.net> wrote in message news:10pq7kush7th00f@corp.supernews.com...
> Thanks Jeff!
>
> That does the trick.  I assume that if need be you could ".Controls(x)" as
> deeply as you have menus nested.
>
> Thanks again for your help.
> Wes
>
>
> "Jeff Conrad" <jeffc@ernstbrothers.com> wrote in message
> news:uGN7KhbzEHA.1396@tk2msftngp13.phx.gbl...
> > Oops, hit the Send button too soon!
> >
> > Here is the example:
> >
> CommandBars("SwitchboardMenu").Controls("Tools").Controls("Administration").
> Enabled = False
> >
> > The menu bar is SwitchboardMenu.
> > Under the Tools menu on the SwitchboardMenu I am disabling the
> Administration option.
> >
> > Your example would be something close to this:
> >
> > CommandBars("MainBar").Controls(1).Controls("WhateverOptionHere).Enabled =
> False
> >
> > -- 
> > Jeff Conrad
> > Access Junkie
> > Bend, Oregon
> >
> > "Wes Peters" <me@here.net> wrote in message
> news:10pq4bide0q8q76@corp.supernews.com...
> > > I can not find any documentation on how to enable or disable submenu
> items
> > > programatically.
> > >
> > > I have a dropdown menu called Administration and under it are five
> > > selections.  I want to be able to programatically enable or disable the
> > > selections based on a users login.  The closest I can get is:
> > >
> > > CommandBars("MainBar").Controls(1).Enabled = False
> > >
> > > but that disables the whole dropdown menu.  I can't find how to
> reference
> > > the properties of the individual menu selections.
> > >
> > > Thanks,
> > > Wes