Short-cut Menu Bar

B

Bill

I have a user written short-cut menu that I use
with right-click actions on forms. I've recently
added some functionality to one of my forms
that brings up another form where I want to use
a "different" short-cut menu for right-clicks. My
question is how do I switch between short-cut
menus in code? I.e., in the OnOpen of a form
and subsequently when I return from the form.

Thanks,
Bill
 
G

Guest

The name of the shortcut menu bar is a property of the form. On opening the
form, you can set

Private Sub Form_Open()
If A Then
Me.ShortCutMenuBar = "ABC"
Else
Me.ShortCutMenuBar = "DEF"
End Sub

Where ABC & DEF are the names of the shortcut menu bars and A is the
condition. The same methodology works for ShortCutMenu and MenuBar.
 
B

Bill

Brian,
If I understand you correctly, I don't need anything in
the code sheet. Rather, I just set the ShortCut property
in the form's property sheet. E.g., in form "A", I set it
to "FormA_R-Click" and on form "X" to use
"FormX_R-Click", etc.? Thus, the desired shortcut
menu will be used according to the form's property.
Correct?
Bill
 
G

Guest

Yes. That is correct. The property can be set per-form and persists until you
either change it in the form's property sheet or override it in code.

My answer was probably overkill. You would only need to use that code if you
wanted to toggle the shortcut bar for a specific form between different
shortcut bars depending on some parameter, such as the security level of the
user that opened the form.
 
B

Bill

Okay, thanks.

Now, I'm going nuts trying to remember how to create a new
popup shortcut menu from scratch. I know how to modify an
existing one, but not how to create a new one. So far, Access
HELP hasn't shown me anything about creating a custom
popup, only how to modify it.

What's the sequence to follow after I check the "Shortcut Menu"
box on the Toolbars tab. I do, at that point, get the menu bar
with the "Customize" box, but that will only show me what
existing popup menus I have in the current database.

What's next?

Bill
 
B

Bill

I found it.

I'm all set.

Thanks,
Bill



Bill said:
Okay, thanks.

Now, I'm going nuts trying to remember how to create a new
popup shortcut menu from scratch. I know how to modify an
existing one, but not how to create a new one. So far, Access
HELP hasn't shown me anything about creating a custom
popup, only how to modify it.

What's the sequence to follow after I check the "Shortcut Menu"
box on the Toolbars tab. I do, at that point, get the menu bar
with the "Customize" box, but that will only show me what
existing popup menus I have in the current database.

What's next?

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top