[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Removing a custom context menu in Access 2013 leads to problems

Posted on 2014-12-19
9
Medium Priority
?
222 Views
Last Modified: 2015-01-06
I'm converting an old Access 2000 database to an access 2013 (.accdb format) database.
In the old mdb there was a simple custom context menu (two macros) which was assigned in the startup options of the database.
I've converted the database to the .accdb format.
I have gone onto the 'this database' options and changed the context menu to (default) and turned off the check box for using context menus, closed the database and opened it.  
The context menu does not appear when I right click the mouse   :-)

Now I opened the database, deleted the two macros which are no longer required and started the database.  The initial form shows  :-)   BUT I also get an error message that the macro can't be found  :-((((

Obviously I can just leave the macros in and everything works as I want but that is really silly.  Why can't I remove these unwanted macros ?
0
Comment
Question by:AndyAinscow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 
LVL 26

Expert Comment

by:Nick67
ID: 40509785
BUT I also get an error message that the macro can't be found  :-((((
Clearly they are referenced in the code.
You didn't just fall off the turnip truck.
I take it you've already done a CTRL-F looking for the macro names in the entire project to see if they can be found?
And I take it that the autoexec macro -- if there is one -- DOESN'T reference these, or if it does, you've redacted the references?

What steps have you taken?
Have you CTRL-BREAKed at the error to get thrown into the IDE at the location of the error?
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 40510500
>>Clearly they are referenced in the code.

That is my problem.  They should not be and I can't find any reference to them in the code.  I can start access, then open the database with the shift key to prevent startup things running.  When I open the startup form by clicking it then no error message.  There is no autoexec macro.

In other words my code/form that runs on startup does not reference the macro.  I'm puzzled.

>>Have you CTRL-BREAKed at the error to get thrown into the IDE at the location of the error?

Please elaborate.
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 40510523
I've been casting my mind back - the DB was originally developed in access 95.
This custom menu was used as an overall context menu AND to replace the default access menu.  (eg. Staff had clicked the print menu option when on a form and obviously the form was printed - not the report that the print button on the form would fill and display).
Now the main menu in Access 2007 (and later) doesn't exist.  (Maybe this is the problem, not the context menu?)  I've checked the startup screen options and explicitly written (default) into both context menu and menu dropdown selectors.  No effect, I still get the error.


ps.  Pressing CTRL+break when I see the error message just dismisses the message box.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 85
ID: 40510548
It's possible the shortcut menu was defined in one or more of your forms, in the Other tab. Check the ones you have open when the error occurs to determine this ...

Now the main menu in Access 2007 (and later) doesn't exist.
Is is supposed to be there? Not sure ...
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 40510665
Just one form open
No context menu set for the form.

>>Is is supposed to be there? Not sure ...
Everything is over the ribbon, no classical menu
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 40512450
Found the problem.
This DB had just the one form which I opened as a popup.  Just to test I changed that setting so I could use the ribbon.  Under the AddIns tab it had created the old menu - hence the error message when the DB was opened.
Now the problem is that the setting in the options for custom menu in 'this database' is totally ignored.
optionsI can even enter a non existant macro name, close the DB and reopen it and the original custom menu is displayed.


This is really looking like a bug.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 40512586
Could also be corruption in the database. Make a backup, then try this:

1. Compact the database
2. Compile the database - to do that, open the VBA Editor and click Debug - Compile. Continue doing this until the menu item is disabled
3. Compact again.

You might also need to Decompile the database. To do this, create a shortcut with this as the Target:

"full path to msaccess.exe" "full path to your db" /decompile

Run that, then run the 3 steps again.

Finally, you might consider moving everything to a new, blank database.

Also be sure your Windows and Office installations are fully up to date.
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 40512702
I've already tried compact/repair and decompiling in the VBA editor.
I had just created a new blank DB and imported everything (except macros).  That is probably less effort than trying to track down and 'repair' it manually.  (I've got about 20 DB's in total to get working)
0
 
LVL 45

Author Closing Comment

by:AndyAinscow
ID: 40535057
Thanks.
I decided to make new blank databases and import all objects/relations except for the macros/custom menus

Everything works fine (allowing for the ribbon being a ******* pain.  Microsoft, please please make it easy for developers to MODIFY THE F*****G thing.)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
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: …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

656 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