Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

How to build meu bar with drop down by code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Irshad Alam - 17 May 2008 08:06 GMT
Is there a way to make a menu bar with drop down with some of the form name
by the help of code.

The same I am doing it manually through Views-ToolsBar-Customise and
dragging and making it.

As there is several user, I am trying to provide them seprate seprate menu
bar (as the all the form will not be provided to them - it will be depending
on their department).

If I can create a code which will make a common menu bar upon opening the
mdb, it can solve my problem

Please advise

Regards

Irshad
Graham R Seach - 17 May 2008 13:14 GMT
Irshad,

You can create toolbars in code, and you can do it at runtime too, but given
you're not an experienced developer, it won't be a trivial exercise. If all
you really want to do initially is to display a common toolbar when the
application is launched, then create the common toolbar, then specify it in
Tools | Startup | Menu Bar.

Make sure to untick [Allow Built-in Toolbars].

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

> Is there a way to make a menu bar with drop down with some of the form
> name
[quoted text clipped - 16 lines]
>
> Irshad
Rick Brandt - 17 May 2008 13:29 GMT
> Is there a way to make a menu bar with drop down with some of the
> form name by the help of code.
[quoted text clipped - 10 lines]
>
> Please advise

Not sure what you mean by "drop down".  Something like this?

Sub AddMenuCombo()

Dim mnu As Object
Dim combo As Object

Set mnu = CommandBars("MyToolBar")
Set combo = mnu.Controls.Add(Type:=4)

With combo
   .AddItem "First Item", 1
   .AddItem "Second Item", 2
   .DropDownLines = 3
   .DropDownWidth = 75
   .ListIndex = 0
End With

End Sub

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Irshad Alam - 17 May 2008 15:04 GMT
Dear Friends,

By the dropdown menu, I meant same like File menu has its dropdown/submenu
like - new - open etc.

I tried the below code, but failed, its produces the error on the first line.

Please advise.

regards

Irshad

> > Is there a way to make a menu bar with drop down with some of the
> > form name by the help of code.
[quoted text clipped - 30 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.