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