Access 2010 VBA Editor stopped say where or what the error is

Posted on 2016-11-03
Last Modified: 2016-11-07
The VBA editor used to say what the error in the code was and indicated the point where it occurred.
It has stopped doing this.
Now it just gives an error message that says "Error in Sub ?????????".
I must have changed a setting, but I can't find it.
Please help.
Question by:Fritz Paul
  • 5
  • 2
  • 2
  • +1
LVL 49

Accepted Solution

Ryan Chong earned 250 total points
ID: 41873439
Now it just gives an error message that says "Error in Sub ?????????"
is that mean you have an error handling in your codes? so when an error was detected, it prompts out that error and exit your subroutine without actually causing your program to crash and break.

Author Comment

by:Fritz Paul
ID: 41873443
Ryan, no the execution stops and I get the error message that only says there was an error and names the routine in which the error occurred, but does not say what the error was like an error code. It also does not say in which line the error occurred.
Previously the error message always said what caused the error and highligted the line of code where the error is.
LVL 13

Expert Comment

by:John Tsioumpris
ID: 41873445
Have you tried to Debug-->Compile to see if you get a  more meaningful error...
If no luck with this then
1st  Compact & Repair
2nd Decompile
3rd  check if you have any ActiveX on you form (i guess)
4th make a new database and import everything from the old one
Unless there is a corruption you also get these kind of errors when you have forgot something that you have deleted it on the form but you use it in the code

Author Comment

by:Fritz Paul
ID: 41873624
I will keep on testing and trying to find the fault.
Up to now I don't find anything wrong.
I have compacted and repaired,
I do not have ActiveX
I have Decompiled
It is a big database with many queries, forms, reports and Macros. I will have to try to copy over on the weekend.
Thanks so far.
LVL 57
ID: 41873789
<<no the execution stops and I get the error message that only says there was an error and names the routine in which the error occurred, but does not say what the error was like an error code. >>

 A screen shot would be good.

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.


Author Comment

by:Fritz Paul
ID: 41873797
This is what I have at the moment. Does that help?
The screenshot come from different databases. It seems to be only this database that has the problem. The others seem normal.
"Use Access special keys under options is selected in both cases.
  As is and as expected.
LVL 13

Expert Comment

by:John Tsioumpris
ID: 41873799
I am pretty sure that you have a control with faulty ControlSource....probably pointing to a faulty/changed/missing function
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 41873854
That error is coming from Access, not VBA (note the title).

Put a stop in the forms OnError event and you can see the error that's occurring.

As John said, something in the form, not VBA code.


Author Comment

by:Fritz Paul
ID: 41874740
Thanks so far guys. I will check it out over the weekend.

Author Closing Comment

by:Fritz Paul
ID: 41877542
After all my efforts, I found that there is error handling which results in the displayed message.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Modern/Metro styled message box and input box that directly can replace MsgBox() and InputBox()in Microsoft Access 2013 and later. Also included is a preconfigured error box to be used in error handling.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now