Avatar of jwandmrsquared
jwandmrsquared
 asked on

MS Access ActiveX Error

I am calling an event written in VBA from a button on a form in Access.  I have the almost IDENTICAL code on another form (I changed the variable and query names, that is IT) that is working just fine.  However, I keep getting the attached error when I try to run it from my new form.

Any ideas?Access error message.
Microsoft Access

Avatar of undefined
Last Comment
jwandmrsquared

8/22/2022 - Mon
PatHartman

Make sure you have no compile errors and no missing references.
jwandmrsquared

ASKER
If I was missing a reference, why would it work on another form in the same database?
PatHartman

Missing references cause errors that almost always have nothing to do with anything.  Usually, it is the first piece of code that is executed that raises the error.  So, you might get an error telling you that the Date() function is invalid if that code is executed first.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
jwandmrsquared

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
jwandmrsquared

ASKER
Because it turned out to be a bizarre bug that few if any could have suggested.