Cancel Right Click Menu

kirkm

Registered User.
Local time
Tomorrow, 11:58
Joined
Oct 30, 2008
Messages
1,257
Hi,

I'm using the MouseDown event in a textbox to run some code
from a right click.
I'd like to cancel the right click menu and was using
DoCmd.CancelEvent
but this isn't working reliably. It's hard to check as you can't step F8 with
the menu present.

Is there another way? My code is working as desired but manually
clearing the menu isn't the best.

Thanks - Kirk
 
Hi Kirk,

In the Startup menu under Tools, there should be an "Allow Default Menus" option - if you uncheck that I believe it should disable the 'right click' menus (once you restart your app) ...

I'd have to hunt around for the code equivalent, but it's sure to be lurking around somewhere in the library...

HTH,
John
 
Hi John,

That seems to do the job nicely. If it doesn't take away anything (else) that might be wanted, it'll be perfect.

Many thanks - Kirk
 
Old thread I know but just adding notes for future searches

Code to turn off(on) shortcut menu in a form is - I put it in the onload event

Me.ShortcutMenu = False

Courtesy of VBanet
 

Users who are viewing this thread

Back
Top Bottom