You can create an empty shortcut menu, and assign that to the Shortcut Menu
Bar property of the control, or you can simply assign some text that is not
the name of an existing command bar or macro, e.g. ="NoSuchMenu". Either
way, you get an empty, sinlge-line shortcut menu.
If you don't like that effect, you could try the following. I have only
briefly tested this one, I haven't used it in the 'real-world', but so far
it seems to work OK. Be sure to test the property before setting it, as in
this example, rather than just setting it regardless of whether it needs to
be set or not, to avoid screen-flicker as the mouse moves across the form.
In this example, 'Address' is the name of the control that we don't want to
have a shortcut menu.
Private Sub Address_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Me.ShortcutMenu = True Then Me.ShortcutMenu = False
End Sub
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Me.ShortcutMenu = False Then Me.ShortcutMenu = True
End Sub
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.