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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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.

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
Dale FyeOwner, Developing Solutions LLCCommented:
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.
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 Access

From novice to tech pro — start learning today.