You can have complete control over menus and submenus using the
CommandBars collection and it's subsequent commandbar and
commandbarcontrols objects. In my applications I build my
commandbars based on a couple of tables. This gives me an easy way
to view/control what goes on the menus. Mine are "dynamic" in that
they are modified during application startup (and customized by User
Group).
For some ideas on working with commandbars and comandbarcontrols you
can take a look at my sample commandbars database. This sample
includes code to create a table based on your current command bars
and code to create commandbars using the contents of the same
tables. Whether or not you are interested in the table driven
approach, the code will give you an idea of some of the was to
programatically work with commandbars.
http://www.daiglenet.com/msaccess.htm
Also, here is a link to another article that describes the way to
work with command bars:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc97/html/msdn_command.asp
--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.
C. Hammer said:
Is it possible to build absolutly dynamic a Menu in a Form based on
SQL-Query and a Module-Function? The main menu could be static, but
the submenus should be created dynamically. Are there some
suggestions to realise it?