D
darkforcesjedi
In a form I put "=ShowFormPopup('FORM_NAME')" for the "Shortcut Menu
Bar" property. ShowFormPopup is a function that customizes a shortcut
menu I created based on the calling form.
This has some problems. I added items to my shortcut menu to change the
view of my form from the "View Menu". When I try to change to Datasheet
view it says it can't change the view because code is executing. Also
it displays a new blank menu after the ShowPopup method completes for
my custom menu.
How do I get a "context-sensitive" menu that applies to the whole form?
example:
Public Function ShowFormPopup()
Dim mnu As CommandBar
Dim ctl As CommandBarControl
Set mnu = CommandBars("FormPopup")
For Each ctl In mnu.Controls
ctl.Visible = ctl.Enabled
Next
mnu.ShowPopup
End Function
Bar" property. ShowFormPopup is a function that customizes a shortcut
menu I created based on the calling form.
This has some problems. I added items to my shortcut menu to change the
view of my form from the "View Menu". When I try to change to Datasheet
view it says it can't change the view because code is executing. Also
it displays a new blank menu after the ShowPopup method completes for
my custom menu.
How do I get a "context-sensitive" menu that applies to the whole form?
example:
Public Function ShowFormPopup()
Dim mnu As CommandBar
Dim ctl As CommandBarControl
Set mnu = CommandBars("FormPopup")
For Each ctl In mnu.Controls
ctl.Visible = ctl.Enabled
Next
mnu.ShowPopup
End Function