Disable the right click context menu of a textbox in Access/VBA

Posted on 2011-10-12
Medium Priority
Last Modified: 2012-05-12
Hi there.

I've written a little bit of code which displays a custom right-click popup menu in a textbox in Access (2003).  The only problem I have is that, when I've selected the menu item from the popup and my code behind that has run, the 'normal' right click context menu appears, and I don't want it to.

Does anybody know how I might either disable this or use VBA to stop it from happening in the first place?

Question by:2toria
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 2000 total points
ID: 36956230
can you try setting the FORM's  shortcut  Menu property to No, if you have not done yet..
LVL 49

Expert Comment

by:Dale Fye
ID: 36956296
How are you calling your custom popup? with the MouseUp or MouseDown event?

If you set the shortcut menu bar property of that textbox to the name of your shortcut menu, it should prevent the standard rightclick menu from popping up.

Author Closing Comment

ID: 36956328
Great stuff - that worked perfectly thanks!!

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lost Word File? Eagerly, need it back? Read ahead; this File Recovery guide is for you.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question