Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: High
  • Security: Public
  • Views: 40
  • Last Modified:

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.


  • 2
1 Solution
Scott McDaniel (Microsoft Access MVP - EE MVE )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.
CRB1609Author Commented:
Thanks very much.  In the end I had to go back to backup.

CRB1609Author Commented:
Dale.  See related question.

Join & Write a Comment

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now