Problem with Shortcut Menus

I have a shortcut menu for some reports so that the user can run a function to change the Report Settings (Fonts and sizes, etc.)   The reports are opened in Print Preview and the user right clicks on the report to get the shortcut menu.

 It has worked well for the past few years.  Now, it works on some reports but not others.  All other functions on the shortcut menu work as they should.  I have not touched this code since I wrote it.  I have attached a text file containing the code that creates the menu.

Can anyone suggest why this may be?

This problem is critical as it is delaying the release of an update to my product.

Thanks in advance.


Clive BeatonAccess DeveloperAsked:
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
Now, it works on some reports but not others.
This sometimes mean you have corruption, since it happens on some but not all reports. You can try to fix that by doing this:

1. Make a backup
2. Compact the database
3. Compile your code - from the VBE window, click Debug - Compile. Fix any errors, and continue doing that until the menuitem is disabled
4. Compact again

Sometimes you need to Decompile your database. Again, make a backup, then create a shortcut with a Target like this:

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

Run that, then compact-compile-compact again.

You could also potentially have corrupt reports. If so, the only fix is to recreate them from scratch, or from a known good backup.
Dale FyeCommented:
Like Scott,

I seriously doubt that this is a problem with the shortcut menu itself.  Have you put a breakpoint in your ReportSettings() function to see whether it is even getting to the function?  Does that function have error handling? Could it be encountering a problem and kicking you out of the function?

BTW,  Are you actually rerunning that code to recreate the menu each time you load your application?  If so, why?  Once you create that menu as a permanent menu, you should not need to mess with it again.
Clive BeatonAccess DeveloperAuthor Commented:
Thanks very much.  In the end I had to go back to backup.

Clive BeatonAccess DeveloperAuthor Commented:
Dale.  See related question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.