PC Review


Reply
Thread Tools Rate Thread

Custom Right click menus

 
 
SJ
Guest
Posts: n/a
 
      1st Mar 2006
Is it possible to create right click menus for Access, so that one could
use them say, on a right click in a text box to perform various custom
functions.

thx


 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIFdpY2tlcmF0aA==?=
Guest
Posts: n/a
 
      2nd Mar 2006
Hi SJ,

I've never done it, but Access Help seems to indicate that it is possible.
Open a form in design view. Click on View > Properties to display the
Properties dialog, if it is not already displayed. Select the text box in
question. You should see the name of the text box in the title bar of the
Properties dialog. Select the Other tab. Click into the Shortcut Menu Bar
property. Press the F1 key to open context sensitive help on this property.
In Access 2002, I see the following:

ShortcutMenuBar Property
You can use the ShortcutMenuBar property to specify the shortcut menu that
will appear when you right-click on a form, report, or control on a form.
Read/write String.



Tom

http://www.access.qbuilt.com/html/ex...tributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________


"SJ" wrote:

> Is it possible to create right click menus for Access, so that one could
> use them say, on a right click in a text box to perform various custom
> functions.
>
> thx
>
>
>

 
Reply With Quote
 
Graham R Seach
Guest
Posts: n/a
 
      2nd Mar 2006
SJ,

Yes, I used them a lot.

1. Right-click the menu bar, and select Customize. The Customize dialog box
is displayed.
2. Click New. The New Toolbar dialog is displayed.
3. Enter a name for your context menu, and click OK. A commandbar is
displayed.
4. Select the Commands tab.
5. Drag the Custom command onto the new commandbar, or alternatively, drag
an existing command onto it.
6. Right-click the custom commandbar you just created, and change the Name
property to something meaningful. This will be the first item on the context
menu.
7. Add, copy & modify, or create an image for the item.
8. Select the style you want for the item (Default Style, Text Only, Text
Only in Menus, or Image and Text). I usually use Image and Text.
9. Select Properties. The control's Properties dialog is displayed.
10. In the OnAction property, enter the name of the function to execute when
the user selects the item. This has to be in the format =MyFunction().
11. Give it a screen tip, if you wish.
12. Click Close.
13. When you've finished adding and modifying commandbar items, select the
Toolbars tab.
14. If your commandbar isn't selected, select it and click Properties. The
Toolbar Properties dialog is displayed.
15. Select Popup from the Type combo, and click OK to the subsequent message
box.
16. Click Close. You have just created a context menu.

To get at the design for your contect menu:
1. Right-click the menu bar, and select Customize. The Customize dialog box
is displayed.
2. Tick Shortcut Menus in the Toolbars list. The shortcut Menus are
displayed (usually at the top of the screen).
3. Select Custom. You'll see your new context menu there.

You'll have to write a public function to handle each menu item's Action
event.

To attach your new context menu to a control:
1. Open up your form, and select the control that will use this context
menu.
2. Display the Properties dialog.
3. Select the Other tab.
4. Select your menu from the Shortcut Menu Bar drop-down.

That's it! Enjoy!

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia


"SJ" <(E-Mail Removed)> wrote in message
news:du58tc$udb$(E-Mail Removed)...
> Is it possible to create right click menus for Access, so that one could
> use them say, on a right click in a text box to perform various custom
> functions.
>
> thx
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Custom Right Click Menus for Connectors and Shapes Joe B. Microsoft Excel Programming 4 17th Mar 2009 01:48 PM
Excel 2007 Custom Right Click Menus for Connectors and Shapes - Re Joe B. Microsoft Excel Programming 0 17th Mar 2009 11:34 AM
Problems with capturing Custom Popup Menus Click Events for CommandbarButton in Forms shane Parkinson Microsoft Access Form Coding 0 11th Jul 2007 12:29 PM
Custom Right Click Menus - Inconsistent Functionality Lee Microsoft Excel Programming 4 4th Feb 2007 03:28 AM
Custom Right Click Menus - Inconsistent Functionality Lee Microsoft Excel Misc 1 3rd Feb 2007 03:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 AM.