Removing a custom context menu in Access 2013 leads to problems

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 ?
LVL 46
AndyAinscowFreelance programmer / ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nick67Commented:
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
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
>>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
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
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
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
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
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
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
AndyAinscowFreelance programmer / ConsultantAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.