Nov 19 2020 06:57 AM
Nov 19 2020 06:57 AM
I've been using Access for better than 20 years at this point. Only in the last few versions have I noticed this problem of "Phantom breakpoints." This is where you'll be working on a module, or piece of VBA code behind a button, form, label, or other object, and you click the breakpoint little maroon circle out to the left of your code, and when you run the code it stops at that breakpoint. It works great!
The problem comes however when you try to un-check the maroon breakpoint - either by clicking it and it goes away, or by using the menu option "clear all breakpoints" - and then most of time time breakpoint will cease to stop the flow of the code. Unfortunately it doesn't always go away. Maybe 2 out of 10 times it will not really clear the breakpoint, and typically I don't find out about it until it's been distributed to the clients and I get a call that "Your application has stopped on that stupid yellow code thing again!" If it only happened 1 out of 100 times, that would be something I could live with, but 20% of the time is move than I can bear. Can someone people tell me of a cure for this problem? Is it something Microsoft is aware of?
Microsoft makes changes to the interface that involve the look of buttons, or the alternate row color setting on reports, which are nice I guess - I prefer the plain jane look of forms and reports, however You would think they would fix this bug before devoting time to making more "flash" for the interface.
-Breakpointed in Tampa
Nov 20 2020 04:16 AM - edited Nov 20 2020 04:17 AM
Yes, this is a known issue and had been brought to their attention in the past. There are numerous issues with each newer version of Access, just one more reason to stay with the tried, tested and true older versions!!
Feel free to send Microsoft your comments through the Feedback command in Access and also through access.uservoice.com
Nov 21 2020 01:32 PM
Although it would be nice if Microsoft found time to correct this, the likelihood of that happening in the context of far more serious, work-stop type bugs, it's not likely to be addressed very soon.
That said, I think you can more or less reliably avoid this problem by making a preventative step one of the things you do just before distributing a new version of an accdb Front End to users.
This "phantom" seems to happen when you've been editing and saving VBA during a session, adding and removing break points. What can happen is that you do end up leaving behind one of those phantoms.
The remedial step I've adopted, based on experience and results shared by others, is that you simply insert and remove one blank line in a module. Then immediately Debug-->Compile your VBA. Then immediately Save it.
Run a Compact & Repair on the accdb. Test in run mode WITHOUT stopping the code anywhere. If the phantom break point does raise its ugly head again, go to the specific procedure and repeat the steps outlined above. At some point, you'll have eliminated them all.
Not as simple, I guess, as being able to count on some automatic process might be, it is effective.
May 10 2021 03:34 PM
May 11 2021 01:26 AM
C&R also clears the issue for me, and you should always run this as one of the last steps before publishing a revision.
If C&R shouldn't work for you, a decompile will. Make a backup and then run:
MSACCESS.EXE yourdb.accdb /decompile
Then call C&R, close Access, relaunch the application, call Compile, and save the modules.