×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

(OP)
This DB has been up and running since 2010. I have relied fairly heavily on macros in its development. I know that the coders see them as being somehow an inferior way of getting the job done, and maybe they are, but they are also a valid part of the toolbox that Microsoft designed and continues to provide. I have simply used what they offered more frequently than many others have.

Regardless, the DB started life as 2007 version and it has been migrated (refuse to use the word 'upgraded') to 2016.

The migration was done more than a year ago, but just in the last day or so these errors have been popping up in many places.

I ran the "Compact and Repair" routine on the DB itself (no help), and then I ran a decompile/recompile operation with the same negative results.

I'm at a complete loss because this DB has been established for such a long time and the errors are all over the map functionally, but always with the same message saying a particular macro (could be any of many) cannot be run because it is invalid. Of course, it does exist and it is valid.

I'd really appreciate the help of the selfless gurus of Tek-Tips to assist me in putting this back to normal. I've got a large company with 20+ users depending on me and I'm at a complete loss to understand what's causing the issue.

Thanks.

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

Can we assume there is some VBA in addition to macros? Does your code compile?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

(OP)
Yes, of course there is VBA as well, and it does compile.

Let's say that I have a macro attached to the OnOpen property of a report. Among other places, I would get the error message there.

I just want to clarify that the problem itself is new, while the database has been up and running with the same instructions forever.

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

Did you try any of the steps mentioned here?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

(OP)
Thank you so much. This is an excellent resource.

Many of those suggestions have been included in my database for a very long time but some are new to me.https://www.tek-tips.com/viewthread.cfm?qid=182553...

I really appreciate the help. It gives me several different directions to go.

It's going to take time to review all of them in context, and something I didn't even mention is that one day a routine might display the error, and then the next it's normal operation as always.

BTW, sorry for the late reply. I've been unable to respond until now but your help is really invaluable.

I'll let you know how it plays out.

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

(OP)
I have finally had a chance to test all the suggestions made in the link.

Workaround 1 – Use Single Step Mode to Test the Macro

I thought this had the most promise but it turned out that the single-step was never triggered. The error occurred before any of the macro steps were run. That's enlightening in itself but it had no bearing on correction.

Workaround 2 – Run MS Access Database without VBA code

The error doesn't occur on login. It only happens intermittently on various routines within the database, so this suggestion wasn't relevant.

Workaround 3 – Turn on Trusted Access to Macros

That is on and has been on for more than a decade. This is a long-established database, so again the suggestion did not apply to me.

Workaround 4 – Update Your Computer

Computers are all updated to latest version of Win10.

Workaround 5 – Re-install Microsoft Visual C++ Runtime Libraries

This was done with no noted change in operation.

Workaround 6 – Repair the Access Database

This has also been done several times without success.

Thank you for the suggestions, but they didn't provide a solution. Do you have any other ideas?

RE: Long-established database suddenly giving error Cannot open macro [Name] because it is not valid

Have you tried creating a new, blank accdb and importing all of the objects?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close