You can create a procedure/function to create custom menu
and run it every time You load main form.
Here is an example:
Sub TestMenuItem()
MsgBox "Hello"
End Sub
Function CreteCustomMenu()
Dim cb As CommandBar
Dim ctr As CommandBarControl
DelCustomMenu
Set cb = CommandBars.Add(Name:="ASDFG",
Position:=msoBarTop) 'normal mode
'Set cb = CommandBars.Add(Name:="ASDFG",
Position:=msoBarTop, MenuBar:=True) 'to overide menu
'Set cb = CommandBars.Add(Name:="ASDFG",
Position:=msoBarTop, MenuBar:=True, Temporary:=True) 'to
overide menu and delete on close application
Set ctr = cb.Controls.Add(Type:=msoControlButton)
With ctr
.Caption = "Test it"
.FaceId = 512
.OnAction = "TestMenuItem"
End With
cb.Visible = True
Set cb = Nothing
Set cb = Nothing
End Function
Sub DelCustomMenu()
On Error Resume Next
CommandBars("ASDFG").Delete
End Sub
-----Original Message-----
I have created a custom menu in my Access database. It
is visible all the time. Every now and then, the items on
this custom menu mysteriously disappear. I then have to
re-create them. To create the menu items, I am just using
the Customize Toolbars dialog box and draggin my items
into my custom menu. Does anyone have any suggestions on
how I can prevent the menu items from disappearing ? It
has happened 3 times to me.