Dynamic Menu in Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Hi,

thanks for your reply. Do you know another method for generating a dynamic
navigation, maybe the way to insert in the detail section some buttons,
because toolbars couldn't used due to the structure of the database and the
distribution of the product?

greez

Chris

Sandra Daigle said:
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?
 
Creating buttons dynamically is not a good option for a variety of reasons.
You can create all the buttons you might need and then hide/show them as
required.

What exactly are you trying to do? If you can explain what you mean by
dynamic navigation and why/how you are going to use it then I might be able
to make some suggestions.

Also why would toolbars not be a viable option?

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


C. Hammer said:
Hi,

thanks for your reply. Do you know another method for generating a
dynamic navigation, maybe the way to insert in the detail section
some buttons, because toolbars couldn't used due to the structure of
the database and the distribution of the product?

greez

Chris

Sandra Daigle said:
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?
 
Back
Top